File
file.contents
Shared
Retrieves the contents of specified directory path
Syntax
local contents = file.contents(path, directory_search = false)Parameters
| Type | Name | Description |
|---|---|---|
string | path | Directory path to check for contents |
bool | directory_search | Indicates whether to search only for directories, ignoring files |
Returns
| Type | Name | Description |
|---|---|---|
table / bool | size | Contents of specified directory on successful execution, or false on failure |
Examples
engine.print("File contents:")
engine.iprint(file.contents("files/images"))