【文件属性】:
文件名称:fsify:将对象数组转换为持久或临时目录结构
文件大小:16KB
文件格式:ZIP
更新时间:2021-04-28 01:00:07
tree filesystem directory structure file
fsify
将对象数组转换为持久或临时目录结构。
内容
描述
fsify从对象数组创建持久或临时目录结构。 就像Linux和Unix tree命令相反。
安装
npm install fsify
用法
有内容的结构
.
├── dirname
│ └── filename
└── filename
const fsify = require ( 'fsify' ) ( )
const structure = [
{
type : fsify . DIRECTORY ,
name : 'dirname' ,
contents : [
{
type : fsify . FILE ,
name : 'filename' ,
contents : 'data'
}
]
} ,
{
type : fsify . FILE ,