Filesystem.odin

WriteCompressedStringFile

WriteCompressedStringFile (filepath: string, text: []string)

WriteCompressedStringFile writes an array of strings to a file. Each line is compressed using Shoco compression before being written.

Parameters:
  • filepath: Destination file path
  • text: Array of strings to compress and write

ReadCompressedStringFile

ReadCompressedStringFile (filepath: string)

ReadCompressedStringFile reads a Shoco-compressed file, decompresses its content, and returns the result split by lines.

Parameters:
  • filepath: Path to the compressed file
Returns: Decompressed lines as an array of strings

ReadCSVFile

ReadCSVFile (filepath: string)

ReadCSVFile reads and parses a CSV file into a flat array of all fields.

Parameters:
  • filepath: Path to the CSV file
Returns: Flat array of all CSV fields

WriteCSVFile

WriteCSVFile (filepath: string, values: []string)

WriteCSVFile writes a flat array of values as a single CSV line to a file.

Parameters:
  • filepath: File to write to
  • values: Flat array of values to write
Returns: True if write succeeded

ReadBase32File

ReadBase32File (filepath: string)

ReadBase32File reads a Base32-encoded file and decodes it into raw bytes.

Parameters:
  • filepath: Path to encoded file
Returns: Decoded byte slice or nil on error

WriteBase32File

WriteBase32File (filepath: string, data: []byte) -> bool

WriteBase32File encodes the given data to Base32 and writes it to a file.

Parameters:
  • filepath: Destination file
  • data: Byte slice to encode
Returns: True if write succeeded

ReadBase64File

ReadBase64File (filepath: string)

ReadBase64File reads a Base64-encoded file and decodes it into raw bytes.

Parameters:
  • filepath: Input file path
Returns: Decoded byte slice or nil on error

WriteBase64File

WriteBase64File (filepath: string, data: []byte) -> bool

WriteBase64File encodes the given data to Base64 and writes it to a file. param: filepath Output file path

Parameters:
  • data: Byte slice to encode
Returns: True if write succeeded

LoadDynamicLibrary

LoadDynamicLibrary (filepath: string, symbol_table: ^$T)

LoadDynamicLibrary loads a dynamic library and resolves its symbols into a struct.

Parameters:
  • filepath: Path to the dynamic library
  • symbol_table: Pointer to struct to receive function pointers

UnloadDynamicLibrary

UnloadDynamicLibrary (symbol_table: $T)

UnloadDynamicLibrary unloads a previously loaded dynamic library.

Parameters:
  • symbol_table: Struct containing the dynamic library handle

ReadGenericFile

ReadGenericFile (path: string)

ReadGenericFile reads a file into buffer of bytes