-
-
Notifications
You must be signed in to change notification settings - Fork 5
File IO
Nenkai edited this page Jul 13, 2024
·
7 revisions
Warning
This API was introduced after GT4.
if (pdistd::ReadFile(path))
{
// File exists
}
var st = main::pdistd::ReadFile(path);
if (st["result"] == pdistd::FileError::OK)
{
var buf = st["buffer"];
// Do something with the buffer...
}
var st = pdistd::GetFileStatus(path);
st["result"] // Result
st["size"] // File Size
st["_time"] // Datetime
pdistd::CopyFile(source, destination);
pdistd::RemoveFile(file);
pdistd::RemoveDirectory(directory, true); // second argument is recursive.