summaryrefslogtreecommitdiffstats
path: root/MCServer/Plugins/APIDump
diff options
context:
space:
mode:
authormadmaxoft <github@xoft.cz>2013-11-22 20:11:24 +0100
committermadmaxoft <github@xoft.cz>2013-11-22 20:11:24 +0100
commit63753c5e8405837931510b8da648dc75d4970fe1 (patch)
tree58e495519d269f4e6d7aff94294101a5911465cc /MCServer/Plugins/APIDump
parentAPIDump: Fixed cRoot's furnace query API. (diff)
downloadcuberite-63753c5e8405837931510b8da648dc75d4970fe1.tar
cuberite-63753c5e8405837931510b8da648dc75d4970fe1.tar.gz
cuberite-63753c5e8405837931510b8da648dc75d4970fe1.tar.bz2
cuberite-63753c5e8405837931510b8da648dc75d4970fe1.tar.lz
cuberite-63753c5e8405837931510b8da648dc75d4970fe1.tar.xz
cuberite-63753c5e8405837931510b8da648dc75d4970fe1.tar.zst
cuberite-63753c5e8405837931510b8da648dc75d4970fe1.zip
Diffstat (limited to '')
-rw-r--r--MCServer/Plugins/APIDump/APIDesc.lua21
1 files changed, 11 insertions, 10 deletions
diff --git a/MCServer/Plugins/APIDump/APIDesc.lua b/MCServer/Plugins/APIDump/APIDesc.lua
index 11b0aeff7..8591d9aa4 100644
--- a/MCServer/Plugins/APIDump/APIDesc.lua
+++ b/MCServer/Plugins/APIDump/APIDesc.lua
@@ -927,22 +927,23 @@ end
cFile =
{
Desc = [[
- Provides helper functions for manipulating and querying the filesystem. Most functions are called
- directly on the cFile class itself:
+ Provides helper functions for manipulating and querying the filesystem. Most functions are static,
+ so they should be called directly on the cFile class itself:
<pre class="prettyprint lang-lua">
cFile:Delete("/usr/bin/virus.exe");
</pre></p>
]],
Functions =
{
- Copy = { Params = "SrcFileName, DstFileName", Return = "bool", Notes = "Copies a single file to a new destination. Returns true if successful. Fails if the destination already exists." },
- CreateFolder = { Params = "FolderName", Return = "bool", Notes = "Creates a new folder. Returns true if successful." },
- Delete = { Params = "FileName", Return = "bool", Notes = "Deletes the specified file. Returns true if successful." },
- Exists = { Params = "FileName", Return = "bool", Notes = "Returns true if the specified file exists." },
- GetSize = { Params = "FileName", Return = "number", Notes = "Returns the size of the file, or -1 on failure." },
- IsFile = { Params = "Path", Return = "bool", Notes = "Returns true if the specified path points to an existing file." },
- IsFolder = { Params = "Path", Return = "bool", Notes = "Returns true if the specified path points to an existing folder." },
- Rename = { Params = "OrigPath, NewPath", Return = "bool", Notes = "Renames a file or a folder. Returns true if successful. Undefined result if NewPath already exists." },
+ Copy = { Params = "SrcFileName, DstFileName", Return = "bool", Notes = "(STATIC) Copies a single file to a new destination. Returns true if successful. Fails if the destination already exists." },
+ CreateFolder = { Params = "FolderName", Return = "bool", Notes = "(STATIC) Creates a new folder. Returns true if successful." },
+ Delete = { Params = "FileName", Return = "bool", Notes = "(STATIC) Deletes the specified file. Returns true if successful." },
+ Exists = { Params = "FileName", Return = "bool", Notes = "(STATIC) Returns true if the specified file exists." },
+ GetFolderContents = { Params = "FolderName", Return = "array table of strings", Notes = "(STATIC) Returns the contents of the specified folder, as an array table of strings. Each filesystem object is listed. Use the IsFile() and IsFolder() functions to determine the object type." },
+ GetSize = { Params = "FileName", Return = "number", Notes = "(STATIC) Returns the size of the file, or -1 on failure." },
+ IsFile = { Params = "Path", Return = "bool", Notes = "(STATIC) Returns true if the specified path points to an existing file." },
+ IsFolder = { Params = "Path", Return = "bool", Notes = "(STATIC) Returns true if the specified path points to an existing folder." },
+ Rename = { Params = "OrigPath, NewPath", Return = "bool", Notes = "(STATIC) Renames a file or a folder. Returns true if successful. Undefined result if NewPath already exists." },
},
}, -- cFile