mirror of
https://github.com/fedddddd/iw5-gsc-utils.git
synced 2025-04-21 05:15:44 +00:00
Update README.md
This commit is contained in:
parent
3d59fd7aa7
commit
d96e28cdcb
12
README.md
12
README.md
@ -44,6 +44,9 @@ This plugin adds some useful functions/methods to IW5's GSC VM
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
# IO
|
# IO
|
||||||
|
|
||||||
|
The basepath for all IO functions is `Plutonium/storage/iw5`
|
||||||
|
|
||||||
* `fopen(path, mode)`: Opens a file of given name with given mode, returns a file stream.
|
* `fopen(path, mode)`: Opens a file of given name with given mode, returns a file stream.
|
||||||
* `fwrite(stream, text)`: Writes a string to a stream.
|
* `fwrite(stream, text)`: Writes a string to a stream.
|
||||||
* `fread(stream)`: Reads entire file.
|
* `fread(stream)`: Reads entire file.
|
||||||
@ -64,6 +67,15 @@ This plugin adds some useful functions/methods to IW5's GSC VM
|
|||||||
fclose(file);
|
fclose(file);
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
* `fileExists(path)`: Returns true if the file exists.
|
||||||
|
* `writeFile(path, data[, append])`: Creates a file if it doesn't exist and writes/appends text to it.
|
||||||
|
* `readFile(path)`: Reads a file.
|
||||||
|
* `fileSize(path)`: Returns file size in bytes.
|
||||||
|
* `createDirectory(path)`: Creates a directory.
|
||||||
|
* `directoryExists(path)`: Returns true if the directory exists.
|
||||||
|
* `directoryIsEmpty(path)`: Returns true if the directory is empty.
|
||||||
|
* `listFiles(path)`: Returns the list of files in the directory as an array.
|
||||||
|
* `copyFolder(source, target)`: Copies a folder.
|
||||||
|
|
||||||
# JSON
|
# JSON
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user