|
Arma Reforger Script API
|
Static Public Member Functions | |
| static bool | CreateDirectory (string absoluteDirectory) |
| OBSOLETE - use FileIO.MakeDirectory instead Create sub-directories in the proper order, circumventing a FileIO.MakeDirectory limitation. | |
| static array< string > | FindFiles (string directoryPath, string extension) |
| static bool | Copy (string source, string destination, bool overwrite=true) |
| Copy source file to destination. | |
| static bool | CopyFile (string sourceFile, string destinationFile) |
| Copy source file to destination - creating the destination directory if needed. | |
| static bool | CopyDirectory (string sourceDirectory, string destinationDirectory) |
| Recursively copy a directory to another, existing or not. | |
| static bool | RenameFile (string sourceFile, string destinationFile) |
| Fake a renaming by copying then deleting the source file. | |
| static string | GetFileStringContent (string filePath, bool printWarning=true) |
| Get file content as one big string. | |
| static array< ref SCR_FileInfo > | GetDirectoryContent (string directory, string extension="") |
| static array< string > | ReadFileContent (string filePath, bool printWarning=true) |
| Get file content as array of lines. | |
| static bool | WriteFileContent (string filePath, notnull array< string > lines) |
| Write all lines in the file, replacing all its content Overwrites the file if it exists. | |
| static bool | AppendFileContent (string filePath, notnull array< string > lines) |
| Write all lines in the file after its existing content Adds to the file if it exists, creates it otherwise. | |
| static bool | IsValidFileName (string fileName) |
| Get whether or not a file name is valid for the filesystem. | |
| static string | SanitiseFileName (string fileName) |
| Sanitise the provided file name (removes invalid characters depending on the current OS, directory information, etc) | |
Protected Member Functions | |
| void | SCR_FileIOHelper () |
Static Protected Member Functions | |
| static bool | IsWindowsBased () |
| static void | FindFilesCallbackMethod (string fileName, FileAttribute attributes=0, string filesystem=string.Empty) |
Static Protected Attributes | |
| static const string | PATH_DELIMITER = SCR_StringHelper.SLASH |
| static const string | FORBIDDEN_FILENAME_CHARS_WINDOWS = "*/\<>:|?\t\r\n\"" |
| static const string | FORBIDDEN_FILENAME_CHARS_LINUX = SCR_StringHelper.SLASH |
| static const ref array< ref SCR_FileInfo > | FOUND_FILEINFOS = {} |
|
protected |
|
static |
Write all lines in the file after its existing content Adds to the file if it exists, creates it otherwise.
| [in] | filePath | relative or absolute |
| [in] | lines |
|
static |
Copy source file to destination.
| [in] | source | file to copy |
| [in] | destination | copy destination |
| [in] | overwrite | set to false to prevent an accidental overwrite |
|
static |
Recursively copy a directory to another, existing or not.
Overwrite is allowed so check before copying
| [in] | sourceDirectory | can be relative or absolute |
| [in] | destinationDirectory | can be relative or absolute |
|
static |
Copy source file to destination - creating the destination directory if needed.
| [in] | sourceFile | |
| [in] | destinationFile |
|
static |
OBSOLETE - use FileIO.MakeDirectory instead
Create sub-directories in the proper order, circumventing a FileIO.MakeDirectory limitation.
| [in] | absoluteDirectory | e.g C:/Arma4/Data/scripts/My/Sub/Directory |
|
static |
| [in] | directoryPath | |
| [in] | extension |
|
staticprotected |
|
static |
| [in] | directory | the directory to browse |
| [in] | extension | the extension of files for which to look |
|
static |
Get file content as one big string.
| [in] | filePath | relative or absolute |
| [in] | printWarning | true to print warning on issue, false otherwise |
|
static |
Get whether or not a file name is valid for the filesystem.
| [in] | fileName | the file name to be sanitised - no file path accepted |
|
staticprotected |
|
static |
Get file content as array of lines.
| [in] | filePath | relative or absolute |
| [in] | printWarning | true to print warning on issue, false otherwise |
|
static |
Fake a renaming by copying then deleting the source file.
| [in] | sourceFile | |
| [in] | destinationFile |
|
static |
Sanitise the provided file name (removes invalid characters depending on the current OS, directory information, etc)
| [in] | fileName | the file name to be sanitised - can take a file path that will be stripped |
|
static |
Write all lines in the file, replacing all its content Overwrites the file if it exists.
| [in] | filePath | relative or absolute |
| [in] | lines |
|
staticprotected |
|
staticprotected |
|
staticprotected |
|
staticprotected |