libnedit
Lightweight C++ library for Nintendo DS(i) formats
Loading...
Searching...
No Matches
Public Member Functions | List of all members
ntr::fs::BinaryFile Class Reference

Public Member Functions

 BinaryFile (const BinaryFile &)=delete
 
Result Open (std::shared_ptr< FileHandle > file_handle, const std::string &path, const OpenMode mode, const FileCompression comp=FileCompression::None)
 
Result Close ()
 
bool IsValid ()
 
bool IsCompressed ()
 
constexpr bool CanRead ()
 
constexpr bool CanWrite ()
 
Result GetSize (size_t &out_size)
 
Result CopyFrom (BinaryFile &other_bf, const size_t size)
 
Result SetAbsoluteOffset (const size_t offset)
 
Result GetAbsoluteOffset (size_t &out_offset)
 
Result SetAtEnd ()
 
Result MoveOffset (const size_t size)
 
Result ReadData (void *read_buf, const size_t read_size, size_t &out_read_size)
 
Result ReadDataExact (void *read_buf, const size_t read_size)
 
template<typename T >
Result Read (T &out_t)
 
template<typename T >
Result ReadLEB128 (T &out_t)
 
template<typename C >
Result ReadNullTerminatedString (std::basic_string< C > &out_str, const size_t tmp_buf_size=0x200)
 
Result WriteData (const void *write_buf, const size_t write_size)
 
template<typename C >
Result WriteString (const std::basic_string< C > &str)
 
Result WriteCString (const char *str)
 
template<typename T >
Result Write (const T t)
 
Result WriteEnsureAlignment (const size_t align, size_t &out_pad_size)
 
template<typename T >
Result WriteVector (const std::vector< T > &vec)
 
template<typename C >
Result WriteNullTerminatedString (const std::basic_string< C > &str)
 

The documentation for this class was generated from the following files: