Env Functions
exists
env files.exists(path: 'PathBuf', min_lines: 'Option < usize >')
Arguments
path: 'PathBuf'
=> Path to checkmin_lines: 'Option < usize >'
=> Minimum number of lines the file should have
Checks if the given path exists
from_file
env files.from_file(path: 'PathBuf', default: 'Option < String >')
Arguments
path: 'PathBuf'
=> File Path to load the contents fromdefault: 'Option < String >'
=> default value
Reads the file contents as string
to_file
env files.to_file(
contents: 'String',
path: 'PathBuf',
append: 'bool' = false,
end: 'String' = "\n"
)
Arguments
contents: 'String'
=> Contents to writepath: 'PathBuf'
=> Path to write the fileappend: 'bool' = false
=> Append to the fileend: 'String' = "\n"
=> End the write with this
Writes the string to the file
Node Functions
exists
node files.exists(path: 'Template', min_lines: 'Option < usize >')
Arguments
path: 'Template'
=> Path to checkmin_lines: 'Option < usize >'
=> Minimum number of lines the file should have
Checks if the given path exists when rendering the template