Current name (including extension) of vfile
.
Cannot contain path separators.
Cannot be nullified either (use file.path = file.dirname
instead).
Raw value.
Base of path
.
Defaults to process.cwd()
.
Place to store custom information.
It's OK to store custom data directly on the vfile
, moving it to data
gives a little more privacy.
Path to parent directory of vfile
.
Cannot be set if there's no path
yet.
Extension (with dot) of vfile
.
Cannot be set if there's no path
yet and cannot contain path separators.
Associates a fatal message with the file, then immediately throws it.
Note: fatal errors mean a file is no longer processable.
Calls message()
internally.
List of file-paths the file moved between.
Associates an informational message with the file, where fatal
is set to null
.
Calls message()
internally.
Associates a message with the file for reason
at position
.
When an error is passed in as reason
, copies the stack.
Each message has a fatal
property which by default is set to false
(ie. warning
).
List of messages associated with the file.
Path of vfile
.
Cannot be nullified.
Name (without extension) of vfile
.
Cannot be nullified, and cannot contain path separators.
Convert contents of vfile
to string.
Generated using TypeDoc
Create a new virtual file. If
options
isstring
orBuffer
, treats it as{contents: options}
. Ifoptions
is aVFile
, returns it. All other options are set on the newly createdvfile
.Path related properties are set in the following order (least specific to most specific):
history
,path
,basename
,stem
,extname
,dirname
.It’s not possible to set either
dirname
orextname
without setting eitherhistory
,path
,basename
, orstem
as well.