fileutils () documon/src/fileutils.js 13
xpath documon.fileutils
file documon/src/fileutils.js

Basic, common and simplified asyncronous file methods.

Methods
copy (src, dest) documon/src/fileutils.js 24

Copies a file from one location to another.

Parameters
src
string

The source file path.

dest
string

The destination to copy the source to.

exists (src) private documon/src/fileutils.js 96

Cehcsk to see if a file exists. Note this also checks if a folder of the same name exists too.

Parameters
src
type

The source file path.

Returns boolean

True if exists, false if no file nor folder exists.

Open (src) documon/src/fileutils.js 45

Reads the entire file as a string. NOTE: This is an alias for read.

Parameters
src
string

The source file path.

Returns string

description description

read (src) documon/src/fileutils.js 53

Reads the entire file as a string.

Parameters
src
string

The source file path.

Returns string

description description

remove (src) documon/src/fileutils.js 85

Deletes a file from the system.

Parameters
src
string

The source file path.

save (src, data) documon/src/fileutils.js 68

Saves text data to a file. Overwrites entire file with provided data. NOTE: This is an alias for write.

Parameters
src
string

The source file path.

data
string

The text data to save.

write (src, data) documon/src/fileutils.js 76

Saves text data to a file. Overwrites entire file with provided data.

Parameters
src
string

The source file path.

data
string

The text data to save.