The official adapter for @jsvfs/core supporting Node's fs module as a back-end for jsvfs.
Allows a developer to define the current working directory that acts as the root of the adapter, and to enable the
flush functionality of the adapter. This second option is important, as flush in this adapter attempts to completely
remove all files and folders from the root of the adapter. To protect developers against accidentally destroying files,
this option defaults to false and must be intentionally enabled.
If you're looking to create new adapters, please use @jsvfs/types and look to this module as an example.
This adapter requires no options, but it will bind by default to the current working directory of the process. Pass a directory in the cwd property to bind to that instead.
JSVFS Adapter: Node fs
The official adapter for
@jsvfs/core
supporting Node'sfs
module as a back-end forjsvfs
.Allows a developer to define the current working directory that acts as the root of the adapter, and to enable the
flush
functionality of the adapter. This second option is important, as flush in this adapter attempts to completely remove all files and folders from the root of the adapter. To protect developers against accidentally destroying files, this option defaults tofalse
and must be intentionally enabled.If you're looking to create new adapters, please use
@jsvfs/types
and look to this module as an example.Supported Features
Installation
Get it from npm:
Usage
This adapter requires no options, but it will bind by default to the current working directory of the process. Pass a directory in the
cwd
property to bind to that instead.Documentation
Complete documentation of
jsvfs
can be found at the jsvfs site.