Env Functions
line
env FILES.line(path: 'PathBuf', line: 'usize')
Arguments:
path: 'PathBuf'=> Path to checkline: 'usize'=> Line number to load as string (starts from 1)
Checks if the given path exists
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,
terminate: 'String' = "\n"
)
Arguments:
contents: 'String'=> Contents to writepath: 'PathBuf'=> Path to write the fileappend: 'bool' = false=> Append to the fileterminate: '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