From 7ff32bae7e12ab5e976d90cbff319b52cf96001e Mon Sep 17 00:00:00 2001 From: anotheruselesaccount <160650467+anotheruselesaccount@users.noreply.github.com> Date: Mon, 22 Apr 2024 12:17:08 +0300 Subject: [PATCH] Update README.md --- README.md | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 7d533b1..d3da9d0 100644 --- a/README.md +++ b/README.md @@ -9,8 +9,24 @@ Detours and reimplements the entire GSC VM + compiler. Adds custom GSC functions. -## FileIO -This plugin provides FileIO interface to GSC for reading and writing files, this is exact to [CoD4x's](https://github.com/callofduty4x/CoD4x_Server/blob/master/scriptdocumentation/script_functions_reference.md#file-operations) interface. +# FileIO +This plugin provides FileIO interface to GSC for reading and writing files. + +## T6 gsc utils io functions + +* ```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. + +* ```createDirectory(path)```: Creates a directory and returns false if failed creating directories. + +* ```directoryExists(path)```: Returns true if the directory exists. + +## CoD4x io function + +This is exact to [CoD4x's](https://github.com/callofduty4x/CoD4x_Server/blob/master/scriptdocumentation/script_functions_reference.md#file-operations) interface. However, all reads and writes will take place strictly and only in the `scriptdata` folder, no up directory traversal allowed.