Skip to content

提供列出文件 API #7765

Closed
Closed
@zuoez02

Description

@zuoez02
Contributor

在什么情况下你需要该特性?In what scenarios do you need this feature?

插件系统需要遍历工作空间data下的目录,以获得对应结构的文件

描述可能的最优解决方案 Describe the optimal solution

API: /api/file/readDir
Request Body: { path: dirPath }
Response Body { files: [
{ type: 'file', name: 'abc.txt' },
{ type: 'folder', name: 'plugins' },
] }

是否需要过滤掉软连接硬链接,还需要思考一下,我这没有太特别的想法。

描述候选的解决方案 Describe the candidate solution

No response

其他信息 Other information

No response

Activity

self-assigned this
on Mar 24, 2023
added this to the 2.8.1 milestone on Mar 24, 2023
changed the title [-]readDir API需求[/-] [+]提供列出文件 API[/+] on Mar 24, 2023
added a commit that references this issue on Mar 24, 2023
added a commit that references this issue on Mar 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

    Development

    No branches or pull requests

      Participants

      @88250@zuoez02

      Issue actions

        提供列出文件 API · Issue #7765 · siyuan-note/siyuan