Global

Members

byteLength

the abbreviation of isByteLength

in

Abbreviation of isIn

len

abbreviation of isLength

toLow

Alias for toLowerCase

toUp

Alias for toUpperCase

Methods

coFsCopy(src, dst) → {Promise}

Helper function to copy file

Parameters:
Name Type Description
src string

path of source file

dst string

path of destination

Returns:
Type
Promise

delDir(path, cb)

Recursively deletes directory at given path

Parameters:
Name Type Description
path string

path of directory to be deleted

cb function

callback function

delFile(path, cb)

Deletes file at given path

Parameters:
Name Type Description
path string

path of file to be deleted

cb function

callback function

ensureDir(dir)

Ensures the given directory exists, and creates if not.

Parameters:
Name Type Description
dir string

path of directory to ensure

formatSize(size) → {string}

Formats file size to string

Parameters:
Name Type Description
size int
Returns:
Type
string

getValue(obj, key, transfn)

Gets the value of given key

Parameters:
Name Type Description
obj object

object to find value

key string

key for value

transfn
Source:

hasKey(obj, key, transfn)

Checks if key exists in object

Parameters:
Name Type Description
obj object

object to find key

key string

key to find

transfn
Source:

isString(s)

Determines if object is a string

Parameters:
Name Type Description
s object