Create file/dir structures from plain js objects on disk
Most useful in testing while combined with tempy.
$ npm install struc
The following input:
const struc = ;;
...would place the following files/directories on disk:
path/file: "file contents" path/directory/another-file: "with stuff inside" path/directory/empty-dir/
Returns the absolute resolved path.
Path to the target directory the structure will be placed inside of. Will be created if doesn't exist, otherwise must be an empty directory.
A file/directory representation, keys represent paths and all values of the object must be of type
array isn't allowed). An
object represents a directory its keys being other files/directories, while
string represents a file with contents being the
MIT © nikersify