mod-functions:io
Differences
This shows you the differences between two versions of the page.
mod-functions:io [2019/05/29 11:13] – external edit 127.0.0.1 | mod-functions:io [2020/05/06 16:16] (current) – removed maxime | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== IO functions ====== | ||
- | ===== fileExists ===== | ||
- | |||
- | Checks if a file exists in the mod directory | ||
- | |||
- | <code lua> | ||
- | local success = myMod: | ||
- | </ | ||
- | |||
- | Parameters: | ||
- | * '' | ||
- | |||
- | Return: | ||
- | * '' | ||
- | |||
- | ---- | ||
- | |||
- | ===== directoryExists ===== | ||
- | |||
- | Checks if a directory exists in the mod directory | ||
- | |||
- | <code lua> | ||
- | local success = myMod: | ||
- | </ | ||
- | |||
- | Parameters: | ||
- | * '' | ||
- | |||
- | Return: | ||
- | * '' | ||
- | |||
- | ---- | ||
- | |||
- | ===== readFileAsString ===== | ||
- | |||
- | Reads a whole file as a single string | ||
- | |||
- | <code lua> | ||
- | local success, content = myMod: | ||
- | </ | ||
- | |||
- | Parameters: | ||
- | * '' | ||
- | |||
- | Return: | ||
- | * '' | ||
- | * '' | ||
- | |||
- | ---- | ||
- | |||
- | ===== writeFileAsString ===== | ||
- | |||
- | Writes a string in a file | ||
- | |||
- | <code lua> | ||
- | local success = myMod: | ||
- | </ | ||
- | |||
- | Parameters: | ||
- | * '' | ||
- | * '' | ||
- | |||
- | Return: | ||
- | * '' | ||
- | |||
- | ---- | ||
- | |||
- | ===== createDirectory ===== | ||
- | |||
- | Creates a directory in the mod directory | ||
- | |||
- | <code lua> | ||
- | local success = myMod: | ||
- | </ | ||
- | |||
- | Parameters: | ||
- | * '' | ||
- | |||
- | Return: | ||
- | * '' | ||
- | |||
- | ---- | ||
- | |||
- | ===== moveFile ===== | ||
- | |||
- | Moves/ | ||
- | |||
- | <code lua> | ||
- | local success = myMod: | ||
- | </ | ||
- | |||
- | Parameters: | ||
- | * '' | ||
- | * '' | ||
- | |||
- | Return: | ||
- | * '' | ||
- | |||
- | ---- | ||
- | |||
- | ===== deleteFile ===== | ||
- | |||
- | Deletes a file within the mod directory | ||
- | |||
- | <code lua> | ||
- | local success = myMod: | ||
- | </ | ||
- | |||
- | Parameters: | ||
- | * '' | ||
- | |||
- | Return: | ||
- | * '' | ||
- | |||
- | ---- | ||
- | |||
- | ===== deleteDirectory ===== | ||
- | |||
- | Deletes a directory and all its content within the mod directory | ||
- | |||
- | <code lua> | ||
- | local success = myMod: | ||
- | </ | ||
- | |||
- | Parameters: | ||
- | * '' | ||
- | |||
- | Return: | ||
- | * '' |
mod-functions/io.1559142834.txt.gz · Last modified: 2019/05/29 11:13 by 127.0.0.1