pete/lib/file

(require("pete/lib/file"))(filepath, overwriteopt) → {external:fs.WriteStream}

Description:
  • Creates directory tree if needed to make the file path available.
    Creates the file if needed.

Source:
Parameters:
Name Type Attributes Default Description
filepath string
overwrite boolean <optional>
false
Throws:

when trying to open file outside of current directory

Type
Error
Returns:
Type
external:fs.WriteStream