fs.list
fs.list
Function
List directory entries.
Syntax
fs(path).list()
Parameters
No parameters.
Return value
| Type | Description |
|---|---|
| Array | Returns an array of fs objects, each element bound to a directory entry path. |
Example
dir = fs('docs-list') dir.create_dir() fs('docs-list/a.txt').write('A') result = dir.list().len() // Output: 1 print result
Notes
- The return order is determined by the operating system directory reading order.