Namespace: file

lib. file

File module.

Author:
  • Taka Okunishi
Source:

Methods

<static> appendFile(src, dest)

Append file contents to another file.

Parameters:
Name Type Description
src string

File path to append from.

dest string

File path to append to.

Author:
  • Taka Okunishi
Source:

<static> copyDir(src, dest, callback)

Copy a directory.

Parameters:
Name Type Description
src string

Directory path to copy from.

dest string

Directory path to copy to.

callback function

Callback when done.

Author:
  • Taka Okunishi
Source:

<static> copyFile(src, dest)

Copy a file.

Parameters:
Name Type Description
src string

File path to copy from.

dest string

File path to copy to.

Author:
  • Taka Okunishi
Source:

<static> expandGlob(patterns, callback)

Expand glob patterns.

Parameters:
Name Type Description
patterns string | Array.<string>

Glob patterns.

callback function

Callback when done.

Author:
  • Taka Okunishi
Source:

Unlink forcefully.

Parameters:
Name Type Description
filename string

File name to unlink.

callback function

Callback when done.

Author:
  • Taka Okunishi
Source:

<static> ignoreFilter(pattern) → {function}

File ignore filter. Excludes files which match ignore patterns.

Parameters:
Name Type Description
pattern string | Array.<string>

Ignore glob pattern(s).

Author:
  • Taka Okunishi
Source:
Returns:
  • File ignore function.
Type
function

<static> loadHbsTmpl(filename, callback)

Load a handlebars template.

Parameters:
Name Type Description
filename string

File path of a handlebar template.

callback function

Callback whit loaded compiled template.

Source:
See:

<static> matchesGlob(filename, pattern)

Returns matches a glob pattern or not

Parameters:
Name Type Description
filename string

Filename.

pattern string

Pattern to match.

Author:
  • Taka okunishi
Source:

<static> mkdirP(dirname, callback)

Make a directory. If any parent directories not exists, make it.(same as mkdir -p)

Parameters:
Name Type Description
dirname string

Directory path to make.

callback function

Callback when done.

Author:
  • Taka Okunishi
Source:

<static> prepareCleanDir(dirname, callback)

Create a cleaned directory. If already exists, regenerate it. If it's parents were missing, create them.

Parameters:
Name Type Description
dirname string

Directory name to prepare.

callback function

Callback when done.

Author:
  • Taka Okunishi
Source:

<static> readdirRecursive(dirname, callback)

Read a directory recursive.

Parameters:
Name Type Description
dirname string

Directory name to read.

callback function

Callback with read filenames.

Author:
  • Taka Okunishi
Source:

<static> readdirRecursiveSync(dirname) → {function}

Read a directory recursive synchronically.

Parameters:
Name Type Description
dirname string

Directory name to read.

Author:
  • Taka Okunishi
Source:
Returns:

filenames - Filenames relative to the directory.

Type
function

Create a symbolic link with relative path.

Parameters:
Name Type Description
src string

Source file (actual file) path.

dest string

Destination file (link) path.

callback function

Callback when done.

Author:
  • Taka Okunishi
Source:

<static> rmdirRecursive(dirname, callback)

Remove a directory recursive.

Parameters:
Name Type Description
dirname string

Directory path to remove.

callback function

Callback when done.

Author:
  • Taka Okunishi
Source:

<static> writeReadonlyFile(filename, content, callback)

Write a readonly file.

Parameters:
Name Type Description
filename string

Filename to write.

content string

File content to write.

callback function

Callback when done.

Author:
  • Taka Okunishi
Source:

Namespace: file

lib. file

File module.

Author:
  • Taka Okunishi
Source:

Methods

<static> appendFile(src, dest)

Append file contents to another file.

Parameters:
Name Type Description
src string

File path to append from.

dest string

File path to append to.

Author:
  • Taka Okunishi
Source:

<static> copyDir(src, dest, callback)

Copy a directory.

Parameters:
Name Type Description
src string

Directory path to copy from.

dest string

Directory path to copy to.

callback function

Callback when done.

Author:
  • Taka Okunishi
Source:

<static> copyFile(src, dest)

Copy a file.

Parameters:
Name Type Description
src string

File path to copy from.

dest string

File path to copy to.

Author:
  • Taka Okunishi
Source:

<static> expandGlob(patterns, callback)

Expand glob patterns.

Parameters:
Name Type Description
patterns string | Array.<string>

Glob patterns.

callback function

Callback when done.

Author:
  • Taka Okunishi
Source:

Unlink forcefully.

Parameters:
Name Type Description
filename string

File name to unlink.

callback function

Callback when done.

Author:
  • Taka Okunishi
Source:

<static> ignoreFilter(pattern) → {function}

File ignore filter. Excludes files which match ignore patterns.

Parameters:
Name Type Description
pattern string | Array.<string>

Ignore glob pattern(s).

Author:
  • Taka Okunishi
Source:
Returns:
  • File ignore function.
Type
function

<static> loadHbsTmpl(filename, callback)

Load a handlebars template.

Parameters:
Name Type Description
filename string

File path of a handlebar template.

callback function

Callback whit loaded compiled template.

Source:
See:

<static> matchesGlob(filename, pattern)

Returns matches a glob pattern or not

Parameters:
Name Type Description
filename string

Filename.

pattern string

Pattern to match.

Author:
  • Taka okunishi
Source:

<static> mkdirP(dirname, callback)

Make a directory. If any parent directories not exists, make it.(same as mkdir -p)

Parameters:
Name Type Description
dirname string

Directory path to make.

callback function

Callback when done.

Author:
  • Taka Okunishi
Source:

<static> prepareCleanDir(dirname, callback)

Create a cleaned directory. If already exists, regenerate it. If it's parents were missing, create them.

Parameters:
Name Type Description
dirname string

Directory name to prepare.

callback function

Callback when done.

Author:
  • Taka Okunishi
Source:

<static> readdirRecursive(dirname, callback)

Read a directory recursive.

Parameters:
Name Type Description
dirname string

Directory name to read.

callback function

Callback with read filenames.

Author:
  • Taka Okunishi
Source:

<static> readdirRecursiveSync(dirname) → {function}

Read a directory recursive synchronically.

Parameters:
Name Type Description
dirname string

Directory name to read.

Author:
  • Taka Okunishi
Source:
Returns:

filenames - Filenames relative to the directory.

Type
function

Create a symbolic link with relative path.

Parameters:
Name Type Description
src string

Source file (actual file) path.

dest string

Destination file (link) path.

callback function

Callback when done.

Author:
  • Taka Okunishi
Source:

<static> rmdirRecursive(dirname, callback)

Remove a directory recursive.

Parameters:
Name Type Description
dirname string

Directory path to remove.

callback function

Callback when done.

Author:
  • Taka Okunishi
Source:

<static> writeReadonlyFile(filename, content, callback)

Write a readonly file.

Parameters:
Name Type Description
filename string

Filename to write.

content string

File content to write.

callback function

Callback when done.

Author:
  • Taka Okunishi
Source:

Namespace: file

lib. file

File module.

Author:
  • Taka Okunishi
Source:

Methods

<static> appendFile(src, dest)

Append file contents to another file.

Parameters:
Name Type Description
src string

File path to append from.

dest string

File path to append to.

Author:
  • Taka Okunishi
Source:

<static> copyDir(src, dest, callback)

Copy a directory.

Parameters:
Name Type Description
src string

Directory path to copy from.

dest string

Directory path to copy to.

callback function

Callback when done.

Author:
  • Taka Okunishi
Source:

<static> copyFile(src, dest)

Copy a file.

Parameters:
Name Type Description
src string

File path to copy from.

dest string

File path to copy to.

Author:
  • Taka Okunishi
Source:

<static> expandGlob(patterns, callback)

Expand glob patterns.

Parameters:
Name Type Description
patterns string | Array.<string>

Glob patterns.

callback function

Callback when done.

Author:
  • Taka Okunishi
Source:

Unlink forcefully.

Parameters:
Name Type Description
filename string

File name to unlink.

callback function

Callback when done.

Author:
  • Taka Okunishi
Source:

<static> ignoreFilter(pattern) → {function}

File ignore filter. Excludes files which match ignore patterns.

Parameters:
Name Type Description
pattern string | Array.<string>

Ignore glob pattern(s).

Author:
  • Taka Okunishi
Source:
Returns:
  • File ignore function.
Type
function

<static> loadHbsTmpl(filename, callback)

Load a handlebars template.

Parameters:
Name Type Description
filename string

File path of a handlebar template.

callback function

Callback whit loaded compiled template.

Source:
See:

<static> matchesGlob(filename, pattern)

Returns matches a glob pattern or not

Parameters:
Name Type Description
filename string

Filename.

pattern string

Pattern to match.

Author:
  • Taka okunishi
Source:

<static> mkdirP(dirname, callback)

Make a directory. If any parent directories not exists, make it.(same as mkdir -p)

Parameters:
Name Type Description
dirname string

Directory path to make.

callback function

Callback when done.

Author:
  • Taka Okunishi
Source:

<static> prepareCleanDir(dirname, callback)

Create a cleaned directory. If already exists, regenerate it. If it's parents were missing, create them.

Parameters:
Name Type Description
dirname string

Directory name to prepare.

callback function

Callback when done.

Author:
  • Taka Okunishi
Source:

<static> readdirRecursive(dirname, callback)

Read a directory recursive.

Parameters:
Name Type Description
dirname string

Directory name to read.

callback function

Callback with read filenames.

Author:
  • Taka Okunishi
Source:

<static> readdirRecursiveSync(dirname) → {function}

Read a directory recursive synchronically.

Parameters:
Name Type Description
dirname string

Directory name to read.

Author:
  • Taka Okunishi
Source:
Returns:

filenames - Filenames relative to the directory.

Type
function

Create a symbolic link with relative path.

Parameters:
Name Type Description
src string

Source file (actual file) path.

dest string

Destination file (link) path.

callback function

Callback when done.

Author:
  • Taka Okunishi
Source:

<static> rmdirRecursive(dirname, callback)

Remove a directory recursive.

Parameters:
Name Type Description
dirname string

Directory path to remove.

callback function

Callback when done.

Author:
  • Taka Okunishi
Source:

<static> writeReadonlyFile(filename, content, callback)

Write a readonly file.

Parameters:
Name Type Description
filename string

Filename to write.

content string

File content to write.

callback function

Callback when done.

Author:
  • Taka Okunishi
Source: