aboutsummaryrefslogtreecommitdiff
path: root/cordova/node_modules/shelljs/src/ln.js
diff options
context:
space:
mode:
authorKumar Priyansh <[email protected]>2020-01-03 18:34:23 +0530
committerKumar Priyansh <[email protected]>2020-01-03 18:34:23 +0530
commitc3373becc9a1393b2e03c8cd6c154601481a60dd (patch)
treea8a31f613aef864d8d481ed57dc2c97490dfd328 /cordova/node_modules/shelljs/src/ln.js
parent2917c8eda330a126b530dd83573670cbc98a4206 (diff)
downloadWeatherApp-c3373becc9a1393b2e03c8cd6c154601481a60dd.tar.xz
WeatherApp-c3373becc9a1393b2e03c8cd6c154601481a60dd.zip
Rewriting the app from scratch with Swift 5
Diffstat (limited to 'cordova/node_modules/shelljs/src/ln.js')
-rwxr-xr-xcordova/node_modules/shelljs/src/ln.js53
1 files changed, 0 insertions, 53 deletions
diff --git a/cordova/node_modules/shelljs/src/ln.js b/cordova/node_modules/shelljs/src/ln.js
deleted file mode 100755
index a7b9701..0000000
--- a/cordova/node_modules/shelljs/src/ln.js
+++ /dev/null
@@ -1,53 +0,0 @@
-var fs = require('fs');
-var path = require('path');
-var common = require('./common');
-var os = require('os');
-
-//@
-//@ ### ln(options, source, dest)
-//@ ### ln(source, dest)
-//@ Available options:
-//@
-//@ + `s`: symlink
-//@ + `f`: force
-//@
-//@ Examples:
-//@
-//@ ```javascript
-//@ ln('file', 'newlink');
-//@ ln('-sf', 'file', 'existing');
-//@ ```
-//@
-//@ Links source to dest. Use -f to force the link, should dest already exist.
-function _ln(options, source, dest) {
- options = common.parseOptions(options, {
- 's': 'symlink',
- 'f': 'force'
- });
-
- if (!source || !dest) {
- common.error('Missing <source> and/or <dest>');
- }
-
- source = path.resolve(process.cwd(), String(source));
- dest = path.resolve(process.cwd(), String(dest));
-
- if (!fs.existsSync(source)) {
- common.error('Source file does not exist', true);
- }
-
- if (fs.existsSync(dest)) {
- if (!options.force) {
- common.error('Destination file exists', true);
- }
-
- fs.unlinkSync(dest);
- }
-
- if (options.symlink) {
- fs.symlinkSync(source, dest, os.platform() === "win32" ? "junction" : null);
- } else {
- fs.linkSync(source, dest, os.platform() === "win32" ? "junction" : null);
- }
-}
-module.exports = _ln;