File

class File()

CreateFile()

File.Close()
File.GetLength()
File.GetPointer()
File.File.ReadData(length, mode)
  • mode - “Hex”, “Int”, “Text”
file.ReadText(2)
File.File.ReadNumber(type)
  • types - “Byte”, “UByte”, “Bool”, “Float”, “FloatLE”, “Long”, “LongLE”, “Short”, “UShort”, “ShortLE”, “UShortLE”, “Int”, “UInt”, “IntLE”, “UIntLE”
File.File.ReadText(type)
  • types -
    • UTF - reads a UTF-8 string with 2 byte header.
    • Line - reads a whole text line terminated by ‘n’, ‘r’, “rn”
    • Char - reads a big-endian 16-bit character
file.ReadText( "Line" )
File.Seek(offset)
File.SetLength(length)
File.Skip()
File.WriteData(data, mode)
  • mode
    • Hex - “FA,FB,FC”
    • Int - “250,251,252”
    • Text - “abc46” => Writes the low order 8-bit bytes.
file.WriteData( "66,121,101", "Int" );
File.File.WriteNumber(data, type)
  • type - “Byte”, “UByte”, “Bool”, “Float”, “FloatLE”, “Long”, “LongLE”, “Short”, “UShort”, “ShortLE”, “UShortLE”, “Int”, “UInt”, “IntLE”, “UIntLE”
file.WriteNumber( 77, "Byte" );
File.WriteText(data, type)
  • type -
    • Bytes - Writes the low order 8-bit bytes.
    • Chars - Writes big-endian 16-bit characters.
    • UTF - Writes text encoded with UTF-8.
file.WriteText( "Hello", "Chars" );