FileNode
From Crumbled World Wiki
Inheritance
Functions
| return | function | description |
|---|---|---|
| bool | contains(string fileName) | Returns true if the file name exist in the node. |
| File | getFile(string fileName) | Always return a file even if the file name do not exist. |
| table | getFileNames() | Return a table with all file names. |
| bool | addFile(string fileName) | Add a file with the same file name as the file path. return true if the file was added else false. |
| bool | addFile(string fileName, string filePath) | Add a file with another name from the current file path. as the file path. return true if the file was added else false. |
| bool | addFile(string fileName, File aFile) | Add a file and save it with the file name. |
| addFileData(string fileName, string textData) | Add a file from a string and save it to given file name. | |
| bool | addDynamicFile(string fileName) | Add a file with the same file name as the file path.
The file is only saved when the tree is saved. This is useful for files that may change during map development as lua files. return true if the file was added else false. |
| bool | addDynamicFile(string fileName, string filePath) | Add a file with another name from the current file path. as the file path.
The file is only saved when the tree is saved. This is useful for files that may change during map development as lua files. return true if the file was added else false. |
| bool | removeFile(string fileName) | Remove a loaded file. return true if the file name was found and removed. |