app.files 上:
列出目录中的文件
app.files.list(path?) 返回一个目录的条目。路径默认为 "/"。
读取文件
app.files.read(path) 返回一个包含文件内容的 Node.js Buffer,当文件不存在时返回 undefined。
读取过大的文件会失败,报错代码为
FILE_TOO_LARGE(413)。创建或覆盖文件
app.files.create(file, fileName, path?) 在 path/fileName 处写入一个文件。路径默认为 "/"。
- 来自 Buffer
- 来自本地路径
编辑文件
app.files.edit(file, path) 覆盖 path 处已存在文件的内容。
移动或重命名文件
app.files.move(path, newPath) 移动或重命名文件或目录。
删除文件或目录
app.files.delete(path) 删除一个文件或整个目录。

