Skip to content
This repository has been archived by the owner on Sep 22, 2021. It is now read-only.

Latest commit

 

History

History
73 lines (49 loc) · 2.14 KB

writer.md

File metadata and controls

73 lines (49 loc) · 2.14 KB

Writer(pathParts)

Constructor

Kind: global function

Param Type
pathParts Array.<string>

writer.setLeadingFileComments(comments)

Sets the contents to write to the beginning of a file when write is called. E.g. legal banner.

Kind: instance method of Writer

Param Type Description
comments string The leading file comments

writer.setTrailingFileComments(comments)

Sets the contents to write to the end of a file when write is called. E.g. legal footer

Kind: instance method of Writer

Param Type Description
comments string The trailing file comments

writer.preventDeletionOf(pathsToPrevent)

Adds items to the list of file and folder names to prevent deleting.

Kind: instance method of Writer

Param Type Description
pathsToPrevent Array.<string> The paths to add to the internal prevention list

writer.clean()

Recursively cleans the base directory

Kind: instance method of Writer

writer.write(path, filename, content)

Writes the contents of a string to a path and file

Kind: instance method of Writer

Param Type Description
path Array.<string> The path to write to
filename string The filename to create/replace
content string The file content