## FileUtils FileUtils class port of ruby For node js only, does not work inside a browser. * [FileUtils](#FileUtils) * [.copy(src, dest, mode)](#FileUtils.copy) * [.cp()](#FileUtils.cp) * [.cp_r(src, dest, mode)](#FileUtils.cp_r) * [.mkdirP(file_name)](#FileUtils.mkdirP) * [.move(source, dest, options)](#FileUtils.move) * [.mv(source, dest, options)](#FileUtils.mv) * [.rmRf(file_name)](#FileUtils.rmRf) * [.rmR(file_name, opt)](#FileUtils.rmR) ### FileUtils.copy(src, dest, mode) Copy file | Param | Type | Description | | --- | --- | --- | | src | string \| Array.<string> | path(s) to source file(s) | | dest | string | path to destination | | mode | number \| fs.constants.COPYFILE\_EXCL \| fs.constants.COPYFILE\_FICLONE \| fs.constants.COPYFILE\_FICLONE\_FORCE | specify behaviour of copy operation | ### FileUtils.cp() Alias for FileUtils.copy(...) ### FileUtils.cp\_r(src, dest, mode) Copies src to dest. If src is a directory, this method copies all its contents recursively. If dest is a directory, copies src to dest/src. src can be a list of files. | Param | Type | Description | | --- | --- | --- | | src | string \| Array.<string> | path(s) to source file(s) | | dest | string | path to destination | | mode | number \| fs.constants.COPYFILE\_EXCL \| fs.constants.COPYFILE\_FICLONE \| fs.constants.COPYFILE\_FICLONE\_FORCE | specify behaviour of copy operation | ### FileUtils.mkdirP(file_name) Create directory recursively | Param | Type | Description | | --- | --- | --- | | file_name | string \| Array.<string> | path(s) to create | ### FileUtils.move(source, dest, options) Move files from source to dest | Param | Type | Default | | --- | --- | --- | | source | string | | | dest | string | | | options | Object | | | options.noop | boolean | false | ### FileUtils.mv(source, dest, options) Move files from source to dest | Param | Type | Default | | --- | --- | --- | | source | string | | | dest | string | | | options | Object | | | options.noop | boolean | false | ### FileUtils.rmRf(file_name) Deletes directory recursively including its contents, force=true | Param | Type | Description | | --- | --- | --- | | file_name | string \| Array.<string> | path(s) to delete recursively | ### FileUtils.rmR(file_name, opt) Deletes directory recursively including its contents | Param | Type | Description | | --- | --- | --- | | file_name | string \| Array.<string> | path(s) to delete recursively | | opt | Object | options |