Module

Node.FS.Extra

Package
purescript-node-fs-extra
Repository
nonbili/purescript-node-fs-extra

#copy Source

copy :: FilePath -> FilePath -> Aff Unit

Copy a file or directory. The directory can have contents. Like cp -r.

#emptyDir Source

emptyDir :: FilePath -> Aff Unit

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.

#ensureDir Source

ensureDir :: FilePath -> Aff Unit

Ensures that the directory exists. If the directory structure does not exist, it is created. Like mkdir -p.

#ensureFile Source

ensureFile :: FilePath -> Aff Unit

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.

#move Source

move :: FilePath -> FilePath -> Aff Unit

Moves a file or directory, even across devices.

#outputFile Source

outputFile :: FilePath -> Buffer -> Aff Unit

Almost the same as writeFile (i.e. it overwrites), except that if the parent directory does not exist, it's created.

#pathExists Source

pathExists :: FilePath -> Aff Boolean

Test whether or not the given path exists by checking with the file system. Like fs.exists, but with a normal callback signature (err, exists). Uses fs.access under the hood.

#remove Source

remove :: FilePath -> Aff Unit

Removes a file or directory. The directory can have contents. If the path does not exist, silently does nothing. Like rm -rf.

Modules
Node.FS.Extra