63 virtual operator const Byte*()
const = 0;
65 virtual operator Byte*() = 0;
75 virtual void Map(
const UInt_64 offset,
const UInt_64 size) = 0;
84 virtual UInt_64
Write(
const Byte*
const data,
const UInt_64 size) = 0;
90 void WriteStr_32(
const Char_32*
const str,
const UInt_64 size);
96 void WriteStr_32(
const Str_32& str);
102 void WriteStr_16(
const Char_16*
const str,
const UInt_64 size);
108 void WriteStr_16(
const Str_16& str);
114 void WriteStr_8(
const Char_8*
const str,
const UInt_64 size);
120 void WriteStr_8(
const Str_8& str);
145 virtual UInt_64
Read(
Byte*
const buffer,
const UInt_64 size) = 0;
151 void ReadStr_32(
Char_32*
const buffer, UInt_64& size);
158 Str_32 ReadStr_32(
const UInt_64 size);
164 void ReadStr_16(
Char_16*
const buffer, UInt_64& size);
171 Str_16 ReadStr_16(
const UInt_64 size);
177 void ReadStr_8(
Char_8*
const buffer, UInt_64& size);
184 Str_8 ReadStr_8(
const UInt_64 size);
212 virtual void Seek(UInt_64 index) = 0;
222 virtual UInt_64
Size()
const = 0;
224 Str_8 GetPath()
const;
226 Str_8 GetFullName()
const;
228 Str_8 GetName()
const;
230 Str_8 GetExtension()
const;
236 static void Rename_32(
const Str_32& filePath,
const Str_32& newName);
238 static void Rename_16(
const Str_16& filePath,
const Str_16& newName);
240 static void Rename_8(
const Str_8& filePath,
const Str_8& newName);
246 static Str_8 ParseFullName_8(
const Str_8& filePath);
252 static Str_8 ParseName_8(
const Str_8& filePath);
258 static Str_8 ParseExt_8(
const Str_8& filePath);
A cross-platform wrapper class that handles native file input/output.
Definition: BaseFile.h:29
Mode mode
Definition: BaseFile.h:35
virtual void Map(const UInt_64 offset, const UInt_64 size)=0
BaseFile & operator=(const BaseFile &file)=default
Str_8 extension
Definition: BaseFile.h:34
virtual void SeekBeginning()=0
virtual UInt_64 Read(Byte *const buffer, const UInt_64 size)=0
Str_8 name
Definition: BaseFile.h:33
virtual ~BaseFile()=default
Frees all native handles.
virtual UInt_64 Size() const =0
Disposition disposition
Definition: BaseFile.h:36
BaseFile(const BaseFile &file)=default
Str_8 fullName
Definition: BaseFile.h:32
virtual bool IsMapped() const =0
virtual void Seek(UInt_64 index)=0
virtual UInt_64 Write(const Byte *const data, const UInt_64 size)=0
virtual void Truncate(const UInt_64 size)=0
Str_8 path
Definition: BaseFile.h:31
virtual bool IsValid() const =0
virtual void FlushMap()=0
virtual UInt_64 MapSize() const =0
Endianness
Definition: CPU.h:21
unsigned int UInt_32
Definition: Types.h:49
char32_t Char_32
Definition: Types.h:42
char Char_8
Definition: Types.h:40
Mode
Definition: BaseFile.h:12
unsigned char Byte
Definition: Types.h:39
Disposition
Definition: BaseFile.h:19
wchar_t Char_16
Definition: Types.h:41