Actions71
- Asset Actions
- Attribute Actions
- Block Actions
- Database Actions
- Document Actions
- Markdown Table Actions
- Notebook Actions
- Search Actions
- System Actions
- Tag Actions
Asset → List Files in Directory
AI-generatedOverview
This node operation lists files in a specified directory within the SiYuan workspace. It is useful for workflows that need to retrieve and process files stored in SiYuan, such as automating file management, generating file inventories, or integrating file data into other processes. For example, a user can list all files in the `/data/` directory to analyze or move them programmatically.
Use Case Examples
- List all files in the `/data/` directory to automate backup processes.
- Retrieve files from the `/assets/` directory to integrate with a content management workflow.
Properties
| Name | Meaning |
|---|---|
| Directory Path | The directory path under the SiYuan workspace where files will be listed. It must start with `/` and can be paths like `/data/` or `/assets/`. |
Output
JSON
fileName- The name of each file found in the specified directory.filePath- The full path of each file within the SiYuan workspace.fileSize- The size of each file in bytes.modifiedTime- The last modified timestamp of each file.
Dependencies
- Requires SiYuan API URL and API token credentials for authentication.
Troubleshooting
- Ensure the directory path starts with `/` as required by the node.
- Verify that the SiYuan API URL and token credentials are correctly set and valid.
- If the node throws an error about unsupported resource, confirm that the resource parameter is set to 'Asset'.
- If the node fails to list files, check that the specified directory exists and is accessible in the SiYuan workspace.