Each command is available:
- either as a stand alone one, e.g.
fse-copy
orfse-cli-copy
, - or as a sub command, e.g.
fse copy
orfse-cli copy
.
The options and arguments are the same as those of Node.js: fs-extra unless otherwise stated.
When launching a job with prompting, by default the user is asked the arguments for which there is no default or inline value. To force prompting for all the arguments, add the option '--all'.
To suppress output when it makes sens (i.e. not an error or an output of query command), use either the option '--quiet'
or the environment variable FSE_CLI_QUIET=true
.
Display @atao60/fse-cli version (and Node.js: fs-extra version).
fse version
Display the present manual.
fse help
From the fs-extra documentation:
"Copy a file or directory. The directory can have contents. Like cp -r."
Follow the prompts
fse copy
Power user style
fse copy --all --keepExisting --errorOnExist --dereference --preserveTimestamps --quiet <source path> <destination path>
Note.
--keepExisting
behaves as the opposite offs-extra
's--overwrite
.
From the fs-extra documentation:
"Ensures that the directory exists. If the directory structure does not exist, it is created. Like mkdir -p."
Aliases: ensureDir, mkdirs, mkdirp
Follow the prompts
fse mkdirp
Power user style
fse mkdirp --all --mode <integer> --quiet <new directory's path>
From the fs-extra documentation:
"Ensures that a directory is empty. Deletes directory contents if the directory is not empty. If the directory does not exist, it is created. The directory itself is not deleted."
Follow the prompts
fse emptyDir
Power user style
fse emptyDir --quiet <directory's path>
From the fs-extra documentation:
"Removes a file or directory. The directory can have contents. If the path does not exist, silently does nothing. Like rm -rf."
Aliases: remove, rimraf
Follow the prompts
fse remove
Power user style
fse remove --quiet <directory's path>
From the fs-extra documentation:
"Ensures that the file exists. If the file that is requested to be created is in directories that do not exist, these directories are created. If the file already exists, it is NOT MODIFIED."
Aliases: ensureFile, touch
Follow the prompts
fse touch
Power user style
fse touch --quiet <new file's path>
From the fs-extra documentation:
"Moves a file or directory, even across devices.
Note: When src
is a file, dest
must be a file and when src
is a directory, dest
must be a directory.
"
Follow the prompts
fse move
Power user style
fse move --all --overwrite --quiet <source path> <destination path>