module
Godot::SystemIO
Overview
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.
Defined in:
libgodot/system_io.crConstant Summary
-
SEEK_END =
2 -
SEEK_SET =
0
Class Method Summary
-
.delete_file(path : String) : Bool
Deletes a file on disk
-
.file_exists?(path : String) : Bool
Returns true if the file exists on disk and can be opened for reading
-
.file_size(path : String) : Int64
Returns the size of the file in bytes, or -1 if the file cannot be opened
-
.read_file(path : String) : String
Reads the entire content of a file from disk into a Crystal String
-
.write_file(path : String, content : String) : Bool
Writes the entire content string to a file on disk
Class Method Detail
def self.file_exists?(path : String) : Bool
#
Returns true if the file exists on disk and can be opened for reading
def self.file_size(path : String) : Int64
#
Returns the size of the file in bytes, or -1 if the file cannot be opened
def self.read_file(path : String) : String
#
Reads the entire content of a file from disk into a Crystal String
def self.write_file(path : String, content : String) : Bool
#
Writes the entire content string to a file on disk