File ¶
An object representing a file
properties¶
Path : string¶
The absolute path to the file.
Size : number¶
The size of the file in bytes.
Created : DateTime¶
The time the file was created.
Accessed : DateTime¶
The time the file was accessed.
Modified : DateTime¶
The time the file was modified.
Exists : boolean¶
Whether or not the file exists yet.
Extension : boolean¶
The file extension of the file.
methods¶
Read -> number ¶
Reads the file as a buffer of unsigned 8 bit integers.Write -> number ¶
Writes the contents of the file. Returns itself.Append -> number ¶
Appends the given contents onto the end of the contents of the file. Returns itself.Delete -> number ¶
Deletes the file.Move -> number ¶
Moves the file to a different location. Returns itself.Copy -> number ¶
Copies the file to a new location. Returns the copied file.metamethods¶
__tostring -> string ¶
Converts the file into a string in the format file [Size] [Path]