# Luomo **Repository Path**: muray/Luomo ## Basic Information - **Project Name**: Luomo - **Description**: Luomo(萝藦) ,一个用于nodejs平台,查找本机目录结构及文件操作的工具库 - **Primary Language**: JavaScript - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2020-08-23 - **Last Updated**: 2021-12-05 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # Luomo Luomo(萝藦) ,一个用于nodejs平台,查找本机目录结构及文件操作的工具库 ## 特性 本工具库基于`graceful-fs`库作为基础。 ## 安装 ``` npm i -S luomo ``` ## API ### 创建 #### `copyDir()` 复制目录中的文件 ```js copyDir(src:string, dest:string, opt:any = {}):Promise ``` #### 创建目录 ```js createDir(dirPath:string):Promise ``` ### 删除 #### `deleteDir()` 删除目录 #### `deleteFile()` 删除文件 ### 读写 #### `readFile()` 读取文件 #### `writeFile()` 写入数据到文件 ### 遍历 #### `lsDir()` 列出目录中得所有文件和目录信息 ```js { type: 'file', // file || dir || other name: '.editorconfig', // file name link: '', // file or dir name ext: '' // ext } ``` ### `lsDisks_win()` 返回windows平台上的分区盘符列表