Gentle Filesystem operations
$ gnpm install gentle-fs
gentle-fs
is a standalone library for
"gently" remove or link directories.
$ npm install gentle-fs
// todo
> rm(target, opts, cb)
Will delete all directories between target
and opts.base
, as long as they are empty.
That is, if target
is /a/b/c/d/e
and base
is /a/b
, but /a/b/c
has other files
besides the d
directory inside of it, /a/b/c
will remain.
rm(target, opts, cb)
> link(from, to, opts, cb)
If from
is a real directory, and from
is not the same directory as to
, will
symlink from
to to
, while also gently rm
ing the to
directory,
and then call the callback. Otherwise, will call callback with an Error
.
link(from, to, opts, cb)
> linkIfExists(from, to, opts, cb)
Performs the same operation as link
, except does nothing when from
is the
same as to
, and calls the callback.
linkIfExists(from, to, opts, cb)
Copyright 2013 - present © cnpmjs.org | Home |