v2026.6.4
All Bundles
Bundle Supports filesystem operations

File

Provides file operations

Example

# static file utilities
if(System.IO.File->Exists("data.txt")) {
  content := System.IO.FileReader->ReadFile("data.txt");
  System.IO.FileWriter->WriteFile("copy.txt", content);
};

Operations

AccessedTime # function

Returns the time in which the file was accessed

function : AccessedTime(n:System.String) ~ Date

Parameters

NameTypeDescription
nStringfilename

Return

TypeDescription
Dateaccessed date

AccessedTime #

Returns the time in which the file was accessed

method : public : AccessedTime() ~ Date

Return

TypeDescription
Dateaccessed date

AccessedTime # function

Returns the time in which the file was accessed

function : AccessedTime(n:System.String, gmt:Bool) ~ Date

Parameters

NameTypeDescription
nStringfilename
gmtBooltrue if GMT

Return

TypeDescription
Dateaccessed date

AccessedTime #

Returns the time in which the file was accessed

method : public : AccessedTime(gmt:Bool) ~ Date

Parameters

NameTypeDescription
gmtBooltrue if GMT

Return

TypeDescription
Dateaccessed date

Copy # function

Copies a file

function : Copy(s:System.String, d:System.String) ~ Bool

Parameters

NameTypeDescription
sStringsource filename
dStringdestination filename

Return

TypeDescription
Booltrue if file was copied

Example

System.IO.File->Copy("source.txt", "backup.txt");

Copy # function

Copies a file

function : Copy(s:System.String, d:System.String, o:Bool) ~ Bool

Parameters

NameTypeDescription
sStringsource filename
dStringdestination filename
oBooltrue to overwrite existing file, false otherwise

Return

TypeDescription
Booltrue if file was copied

CreateTime # function

Returns the time in which the file was created

function : CreateTime(n:System.String) ~ Date

Parameters

NameTypeDescription
nStringfilename

Return

TypeDescription
Datecreate date

CreateTime #

Returns the time in which the file was created

method : public : CreateTime() ~ Date

Return

TypeDescription
Datecreate date

CreateTime # function

Returns the time in which the file was created

function : CreateTime(n:System.String, gmt:Bool) ~ Date

Parameters

NameTypeDescription
nStringfilename
gmtBooltrue if GMT

Return

TypeDescription
Datecreate date

CreateTime #

Returns the time in which the file was created

method : public : CreateTime(gmt:Bool) ~ Date

Parameters

NameTypeDescription
gmtBooltrue if GMT

Return

TypeDescription
Datecreate date

Delete # function

Deletes the file

function : Delete(n:System.String) ~ Bool

Parameters

NameTypeDescription
nStringfilename

Return

TypeDescription
Booltrue if file was deleted, false otherwise

Example

if(System.IO.File->Delete("temp.txt")) {
  "Deleted"->PrintLine();
};

Delete #

Deletes a file

method : public : Delete() ~ Bool

Return

TypeDescription
Booltrue if file was deleted

Exists # function

Checks if a file exists

function : Exists(n:System.String) ~ Bool

Parameters

NameTypeDescription
nStringfilename

Return

TypeDescription
Booltrue if file exists

Example

if(System.IO.File->Exists("config.json")) {
  "File found"->PrintLine();
};

Exists #

Checks if a file exists

method : public : Exists() ~ Bool

Return

TypeDescription
Booltrue if file exists

Flush #

Flushes the file buffer

method : public : Flush() ~ Nil

GetFullName # function

Gets the full path name for file

function : GetFullName(n:System.String) ~ System.String

Parameters

NameTypeDescription
nStringfilename

Return

TypeDescription
Stringfull path name, Nil otherwise

GetFullName #

Gets the full path name for file

method : public : GetFullName() ~ System.String

Return

TypeDescription
Stringfull path name, Nil otherwise

GetName #

Gets the filename

method : public : GetName() ~ String

Return

TypeDescription
Stringfilename

GetTempName # function

Gets a temporary filename

function : GetTempName() ~ System.String

Return

TypeDescription
Stringtemporary filename

Group # function

Gets the file group name

function : Group(n:System.String) ~ System.String

Parameters

NameTypeDescription
nStringfilename

Return

TypeDescription
Stringfile group name

Group #

Gets the file group name

method : public : Group() ~ System.String

Return

TypeDescription
Stringfile group name

IsEoF #

Check if seek pointer is at the end-of-file

method : public : IsEoF() ~ Bool

Return

TypeDescription
Booltrue if at the end-of-file, false otherwise

IsOpen #

Checks of the file is open

method : public : IsOpen() ~ Bool

Return

TypeDescription
Booltrue if the file was opened, false otherwise

IsReadOnly # function

Checks if a file can be read

function : IsReadOnly(n:System.String) ~ Bool

Parameters

NameTypeDescription
nStringfilename

Return

TypeDescription
Booltrue if file can be read

IsReadOnly #

Checks if a file can be read

method : public : IsReadOnly() ~ Bool

Return

TypeDescription
Booltrue if file can be read

IsReadWrite # function

Checks if a file can be read-only

function : IsReadWrite(n:System.String) ~ Bool

Parameters

NameTypeDescription
nStringfilename

Return

TypeDescription
Booltrue if file can be read-only

IsReadWrite #

Checks if a file can be read-only

method : public : IsReadWrite() ~ Bool

Return

TypeDescription
Booltrue if file can be read-only

IsWriteOnly # function

Checks if a file can be written

function : IsWriteOnly(n:System.String) ~ Bool

Parameters

NameTypeDescription
nStringfilename

Return

TypeDescription
Booltrue if file can be written

IsWriteOnly #

Checks if a file can be written

method : public : IsWriteOnly() ~ Bool

Return

TypeDescription
Booltrue if file can be written

ModifiedTime # function

Returns the time in which the file was modified

function : ModifiedTime(n:System.String) ~ Date

Parameters

NameTypeDescription
nStringfilename

Return

TypeDescription
Datemodified date

ModifiedTime # function

Returns the time in which the file was modified

function : ModifiedTime(n:System.String, gmt:Bool) ~ Date

Parameters

NameTypeDescription
nStringfilename
gmtBooltrue if GMT

Return

TypeDescription
Datemodified date

New # constructor

Default constructor

New(name:System.String)

Parameters

NameTypeDescription
nameStringfilename

Owner # function

Gets the file owner name

function : Owner(n:System.String) ~ System.String

Parameters

NameTypeDescription
nStringfilename

Return

TypeDescription
Stringfile owner name

Owner #

Gets the file owner name

method : public : Owner() ~ System.String

Return

TypeDescription
Stringfile owner name

Rename # function

Renames a file

function : Rename(o:System.String, n:System.String) ~ Bool

Parameters

NameTypeDescription
oStringoriginal filename
nStringnew filename

Return

TypeDescription
Booltrue if file was renamed

Example

System.IO.File->Rename("old.txt", "new.txt");

Rewind #

Rewinds the seek pointer

method : public : Rewind() ~ Nil

Seek #

Seeks to a point in the file

method : public : Seek(p:Int) ~ Bool

Parameters

NameTypeDescription
pIntseek offset

Return

TypeDescription
Booltrue if operation was successful, false otherwise

Size # function

Returns the size of the file

function : Size(n:System.String) ~ Int

Parameters

NameTypeDescription
nStringfilename

Return

TypeDescription
Intsize of the file

Example

bytes := System.IO.File->Size("data.bin");
"Size: {$bytes} bytes"->PrintLine();

Size #

Returns the size of the file

method : public : Size() ~ Int

Return

TypeDescription
Intsize of the file