Directory lister (paths)
Last updated
Last updated
[io/file/Directory lister (paths)]
Non-recursively lists the paths of files & directories under the specified path. Example (success):
"/home/user1/dir1"@0 received on path
[ "/home/user1/dir1/foo.txt", "/home/user1/dir1/bar.txt" ]@0 sent on child names
Example (failure):
"/home/user1/dir1"@0 received on path
"/home/user1/dir1"@0 sent on bounced
{
"error": "Error: ENOENT: no such file or directory, scandir '/home/user1/dir1'"
}@0 sent on error
path: string
Receives the path of the directory to list the content of. Example: "/home/user1/dir1" (To keep the application portable use "/" as path separator.)
child paths: string[]
Sends the path of files & directories under the specified path. Example: [ "/home/user1/dir1/foo.txt", "/home/user1/dir1/subdir1" ]
bounced: string
Sends the path if the operation has failed. Example: "/home/user1/dir1"
error: {"error": string}
Sends error information if the operation has failed. Example: { "error": "Error: ENOENT: no such file or directory, scandir 'home/user1'" }