module

Godot::SystemIO

Low-level CRT file I/O that operates safely on alien/engine threads without depending on Crystal's IOCP event loop or Thread/Fiber runtime state.

Constants

SEEK_END = 2
SEEK_SET = 0

Class methods

delete_file(path : String) : Bool

Deletes a file on disk

Source
file_exists?(path : String) : Bool

Returns true if the file exists on disk and can be opened for reading

Source
file_size(path : String) : Int64

Returns the size of the file in bytes, or -1 if the file cannot be opened

Source
read_file(path : String) : String

Reads the entire content of a file from disk into a Crystal String

Source
write_file(path : String, content : String) : Bool

Writes the entire content string to a file on disk

Source