IO group



The file mode to put the file stream in.

IO::FileMode::None = 0
IO::FileMode::Read = 1
IO::FileMode::Write = 2
IO::FileMode::Append = 3

IO::File Manages a file reading or writing stream.

FileSource Manages a file reading stream from a file source, such as a plugin's zip or folder contents.

Global functions

string IO::FromDataFolder(const string&in filename) Gets the absolute path for a file in the data folder. This is typically C:\Users\Username\OpenplanetNext

bool IO::FileExists(const string&in filename) Checks if the given path exists.

uint64 IO::FileSize(const string&in filename) Gets the size of the given file.

void IO::Delete(const string&in filename) Deletes the given file.

bool IO::FolderExists(const string&in path) Checks if the given path exists.

void IO::CreateFolder(const string&in path, bool recursive = true) Creates a folder at the given location.

string[]@ IO::IndexFolder(const string&in path, bool recursive) Lists files and folders in the current folder. If recursive is true, it will only return files.

void IO::SetClipboard(const wstring&in text) Copies text on the clipboard.