FileSystem - stingray.FileSystem namespace reference - Stingray Lua API Reference
Provides utilities for working with the local file system.
See in particular project_path(), which provides the absolute path to the
current project folder.
|
Get the absolute path of the AppData folder using the Windows API (using shell lib).
|
Parameters | This function does not accept any parameters. |
Returns string |
Absolute path of the AppData special folder.
|
Available only on Windows platforms.
|
Check if a file exists
|
Parameters path : | string |
The path of the file
|
Returns boolean |
return true if the file exists, false if not
|
|
Creates a new disk file system with the specified directory as its root.
|
Parameters path : | string |
The path of the file system
|
Returns | This function does not return any values. |
You can use
the empty string for the directory if you want a file system that represents the entire
disk. Need to call this first.
|
Create all the directories needed specified in the path.
|
Parameters path : | string |
The path of the directory to create
|
Returns boolean |
return true if the directory was created, false if there was an error
|
|
Get the absolute path of the project folder, which is the bundle or data directory depending on the current runtime.
|
Parameters | This function does not accept any parameters. |
Returns string |
Absolute path of the project folder.
|
|
Remove the file specified in path.
|
Parameters path : | string |
The path of the file to delete
|
Returns integer |
return 0 if there was no error
|
|
Destroys a file system created by initialize.
|
Parameters | This function does not accept any parameters. |
Returns | This function does not return any values. |