ArchiveFileDevice class
Base classes
- class FileDevice
Public types
- struct ArchiveFileHandle
- enum FileOpenFlag { cFileOpenFlag_ReadOnly = 0, cFileOpenFlag_WriteOnly = 1, cFileOpenFlag_ReadWrite = 2, cFileOpenFlag_Create = 3 }
- enum SeekOrigin { cSeekOrigin_Begin = 0, cSeekOrigin_Current = 1, cSeekOrigin_End = 2 }
- enum class HeapNullOption { AlwaysUseSpecifiedHeap = 0, UseSpecifiedOrContainHeap = 1, DoNotAppendDisposerIfNoHeapSpecified = 2, UseSpecifiedOrCurrentHeap = 3 }
Public static variables
- static const s32 cBufferMinAlignment
Public static functions
- static auto getListNodeOffset() -> u32
Constructors, destructors, conversion operators
- ArchiveFileDevice(ArchiveRes* archive_res) explicit
- ~ArchiveFileDevice() defaulted override
Public functions
- auto tryLoadWithEntryID(s32 id, LoadArg& arg) -> u8*
- auto tryOpenWithEntryID(FileHandle* handle, s32 id, FileOpenFlag flag, u32 div_size) -> FileDevice*
- auto tryConvertPathToEntryID(const SafeString& path) -> s32
- auto setCurrentDirectory(const SafeString& dir) -> bool
- auto getDriveName() const -> const SafeString&
- void setDriveName(const SafeString& name)
- auto hasPermission() const -> bool
- void setHasPermission(bool perm)
- auto isAvailable() const -> bool
- auto tryLoad(LoadArg& arg) -> u8*
- auto save(SaveArg& arg) -> bool
- auto trySave(SaveArg& arg) -> bool
- auto open(FileHandle* handle, const SafeString& path, FileOpenFlag flag, u32 divSize = 0) -> FileDevice*
- auto tryOpen(FileHandle* handle, const SafeString& path, FileOpenFlag flag, u32 divSize = 0) -> FileDevice*
- auto close(FileHandle* handle) -> bool
- auto tryClose(FileHandle* handle) -> bool
- auto flush(FileHandle* handle) -> bool
- auto tryFlush(FileHandle* handle) -> bool
- auto remove(const SafeString& str) -> bool
- auto tryRemove(const SafeString& str) -> bool
- auto read(FileHandle* handle, u8* data, u32 size) -> u32
- auto tryRead(u32* bytesRead, FileHandle* handle, u8* outBuffer, u32 bytesToRead) -> bool
- auto write(FileHandle* handle, const u8* data, u32 size) -> u32
- auto tryWrite(u32* bytesWritten, FileHandle* handle, const u8* inBuffer, u32 bytesToWrite) -> bool
- auto seek(FileHandle* handle, s32 offset, SeekOrigin origin) -> bool
- auto trySeek(FileHandle* handle, s32 offset, SeekOrigin origin) -> bool
- auto getCurrentSeekPos(FileHandle* handle) -> u32
- auto tryGetCurrentSeekPos(u32* seekPos, FileHandle* handle) -> bool
- auto getFileSize(const SafeString& path) -> u32
- auto getFileSize(FileHandle* handle) -> u32
- auto tryGetFileSize(u32* fileSize, const SafeString& path) -> bool
- auto tryGetFileSize(u32* size, FileHandle* handle) -> bool
- auto isExistFile(const SafeString& path) -> bool
- auto tryIsExistFile(bool* exists, const SafeString& path) -> bool
- auto isExistDirectory(const SafeString& path) -> bool
- auto tryIsExistDirectory(bool* exists, const SafeString& path) -> bool
- auto openDirectory(DirectoryHandle* handle, const SafeString& path) -> FileDevice*
- auto tryOpenDirectory(DirectoryHandle* handle, const SafeString& path) -> FileDevice*
- auto closeDirectory(DirectoryHandle* handle) -> bool
- auto tryCloseDirectory(DirectoryHandle* handle) -> bool
- auto readDirectory(DirectoryHandle* handle, DirectoryEntry* entries, u32 num_entries) -> u32
- auto tryReadDirectory(u32* entriesRead, DirectoryHandle* handle, DirectoryEntry* entries, u32 entriesToRead) -> bool
- auto makeDirectory(const SafeString& path, u32 x) -> bool
- auto tryMakeDirectory(const SafeString& path, u32) -> bool
- auto makeDirectoryWithParent(const SafeString& path, u32 x) -> bool
- auto tryMakeDirectoryWithParent(const SafeString& path, u32) -> bool
- auto getLastRawError() const -> s32
- void traceFilePath(const SafeString& path) const virtual
- void traceDirectoryPath(const SafeString& path) const virtual
- void resolveFilePath(BufferedSafeString* out, const SafeString& path) const virtual
- void resolveDirectoryPath(BufferedSafeString* out, const SafeString& path) const virtual
- auto isMatchDevice_(const HandleBase* handle) const -> bool virtual
- void erase()
Public variables
Protected functions
- auto doIsAvailable_() const -> bool override
- auto doLoad_(LoadArg& arg) -> u8* override
- auto doOpen_(FileHandle* handle, const SafeString& path, FileOpenFlag flag) -> FileDevice* override
- auto doClose_(FileHandle* handle) -> bool override
- auto doFlush_(FileHandle* handle) -> bool override
- auto doRemove_(const SafeString& str) -> bool override
- auto doRead_(u32* bytesRead, FileHandle* handle, u8* outBuffer, u32 bytesToRead) -> bool override
- auto doWrite_(u32*, FileHandle*, const u8*, u32) -> bool override
- auto doSeek_(FileHandle* handle, s32 offset, SeekOrigin origin) -> bool override
- auto doGetCurrentSeekPos_(u32* seekPos, FileHandle* handle) -> bool override
- auto doGetFileSize_(u32* fileSize, const SafeString& path) -> bool override
- auto doGetFileSize_(u32* fileSize, FileHandle* handle) -> bool override
- auto doIsExistFile_(bool* exists, const SafeString& path) -> bool override
- auto doIsExistDirectory_(bool* exists, const SafeString& path) -> bool override
- auto doOpenDirectory_(DirectoryHandle* handle, const SafeString& path) -> FileDevice* override
- auto doCloseDirectory_(DirectoryHandle* handle) -> bool override
- auto doReadDirectory_(u32* entriesRead, DirectoryHandle* handle, DirectoryEntry* entry, u32 entriesToRead) -> bool override
- auto doMakeDirectory_(const SafeString& path, u32 u_32) -> bool override
- auto doGetLastRawError_() const -> s32 override
- auto doLoadWithEntryID_(s32 id, LoadArg& arg) -> u8* virtual
- auto doOpenWithEntryID_(FileHandle* handle, s32 id, FileOpenFlag flag) -> FileDevice* virtual
- auto doConvertPathToEntryID_(const SafeString& path) -> s32 virtual
- auto doSetCurrentDirectory_(const SafeString& path) -> bool virtual
- auto getArchiveFileHandle_(FileHandle* handle) const -> ArchiveFileHandle*
- auto constructArchiveFileHandle_(FileHandle* handle) const -> ArchiveFileHandle*
- auto doSave_(SaveArg& arg) -> bool virtual
- void doTracePath_(const SafeString& path) const virtual
- void doResolvePath_(BufferedSafeString* out, const SafeString& path) const virtual
- void setFileHandleDivSize_(FileHandle* handle, u32 divSize) const
- void setHandleBaseFileDevice_(HandleBase* handle, FileDevice* device) const
- void setHandleBaseOriginalFileDevice_(HandleBase* handle, FileDevice* device) const
- auto getHandleBaseHandleBuffer_(HandleBase* handle) const -> HandleBuffer&
- auto getDisposerHeap_() const -> Heap*
Protected variables
- ArchiveRes* mArchive
- FixedSafeString<32> mDriveName
- bool mPermission
Enum documentation
enum sead:: ArchiveFileDevice:: FileOpenFlag
#include <filedevice/seadFileDevice.h>
enum sead:: ArchiveFileDevice:: SeekOrigin
#include <filedevice/seadFileDevice.h>
enum class sead:: ArchiveFileDevice:: HeapNullOption
#include <heap/seadDisposer.h>
Function documentation
static u32 sead:: ArchiveFileDevice:: getListNodeOffset()
#include <heap/seadDisposer.h>
const SafeString& sead:: ArchiveFileDevice:: getDriveName() const
#include <filedevice/seadFileDevice.h>
void sead:: ArchiveFileDevice:: setDriveName(const SafeString& name)
#include <filedevice/seadFileDevice.h>
bool sead:: ArchiveFileDevice:: hasPermission() const
#include <filedevice/seadFileDevice.h>
void sead:: ArchiveFileDevice:: setHasPermission(bool perm)
#include <filedevice/seadFileDevice.h>
bool sead:: ArchiveFileDevice:: isAvailable() const
#include <filedevice/seadFileDevice.h>
u8* sead:: ArchiveFileDevice:: tryLoad(LoadArg& arg)
#include <filedevice/seadFileDevice.h>
bool sead:: ArchiveFileDevice:: save(SaveArg& arg)
#include <filedevice/seadFileDevice.h>
bool sead:: ArchiveFileDevice:: trySave(SaveArg& arg)
#include <filedevice/seadFileDevice.h>
FileDevice* sead:: ArchiveFileDevice:: open(FileHandle* handle,
const SafeString& path,
FileOpenFlag flag,
u32 divSize = 0)
#include <filedevice/seadFileDevice.h>
FileDevice* sead:: ArchiveFileDevice:: tryOpen(FileHandle* handle,
const SafeString& path,
FileOpenFlag flag,
u32 divSize = 0)
#include <filedevice/seadFileDevice.h>
bool sead:: ArchiveFileDevice:: close(FileHandle* handle)
#include <filedevice/seadFileDevice.h>
bool sead:: ArchiveFileDevice:: tryClose(FileHandle* handle)
#include <filedevice/seadFileDevice.h>
bool sead:: ArchiveFileDevice:: flush(FileHandle* handle)
#include <filedevice/seadFileDevice.h>
bool sead:: ArchiveFileDevice:: tryFlush(FileHandle* handle)
#include <filedevice/seadFileDevice.h>
bool sead:: ArchiveFileDevice:: remove(const SafeString& str)
#include <filedevice/seadFileDevice.h>
bool sead:: ArchiveFileDevice:: tryRemove(const SafeString& str)
#include <filedevice/seadFileDevice.h>
u32 sead:: ArchiveFileDevice:: read(FileHandle* handle,
u8* data,
u32 size)
#include <filedevice/seadFileDevice.h>
bool sead:: ArchiveFileDevice:: tryRead(u32* bytesRead,
FileHandle* handle,
u8* outBuffer,
u32 bytesToRead)
#include <filedevice/seadFileDevice.h>
u32 sead:: ArchiveFileDevice:: write(FileHandle* handle,
const u8* data,
u32 size)
#include <filedevice/seadFileDevice.h>
bool sead:: ArchiveFileDevice:: tryWrite(u32* bytesWritten,
FileHandle* handle,
const u8* inBuffer,
u32 bytesToWrite)
#include <filedevice/seadFileDevice.h>
bool sead:: ArchiveFileDevice:: seek(FileHandle* handle,
s32 offset,
SeekOrigin origin)
#include <filedevice/seadFileDevice.h>
bool sead:: ArchiveFileDevice:: trySeek(FileHandle* handle,
s32 offset,
SeekOrigin origin)
#include <filedevice/seadFileDevice.h>
u32 sead:: ArchiveFileDevice:: getCurrentSeekPos(FileHandle* handle)
#include <filedevice/seadFileDevice.h>
bool sead:: ArchiveFileDevice:: tryGetCurrentSeekPos(u32* seekPos,
FileHandle* handle)
#include <filedevice/seadFileDevice.h>
u32 sead:: ArchiveFileDevice:: getFileSize(const SafeString& path)
#include <filedevice/seadFileDevice.h>
u32 sead:: ArchiveFileDevice:: getFileSize(FileHandle* handle)
#include <filedevice/seadFileDevice.h>
bool sead:: ArchiveFileDevice:: tryGetFileSize(u32* fileSize,
const SafeString& path)
#include <filedevice/seadFileDevice.h>
bool sead:: ArchiveFileDevice:: tryGetFileSize(u32* size,
FileHandle* handle)
#include <filedevice/seadFileDevice.h>
bool sead:: ArchiveFileDevice:: isExistFile(const SafeString& path)
#include <filedevice/seadFileDevice.h>
bool sead:: ArchiveFileDevice:: tryIsExistFile(bool* exists,
const SafeString& path)
#include <filedevice/seadFileDevice.h>
bool sead:: ArchiveFileDevice:: isExistDirectory(const SafeString& path)
#include <filedevice/seadFileDevice.h>
bool sead:: ArchiveFileDevice:: tryIsExistDirectory(bool* exists,
const SafeString& path)
#include <filedevice/seadFileDevice.h>
FileDevice* sead:: ArchiveFileDevice:: openDirectory(DirectoryHandle* handle,
const SafeString& path)
#include <filedevice/seadFileDevice.h>
FileDevice* sead:: ArchiveFileDevice:: tryOpenDirectory(DirectoryHandle* handle,
const SafeString& path)
#include <filedevice/seadFileDevice.h>
bool sead:: ArchiveFileDevice:: closeDirectory(DirectoryHandle* handle)
#include <filedevice/seadFileDevice.h>
bool sead:: ArchiveFileDevice:: tryCloseDirectory(DirectoryHandle* handle)
#include <filedevice/seadFileDevice.h>
u32 sead:: ArchiveFileDevice:: readDirectory(DirectoryHandle* handle,
DirectoryEntry* entries,
u32 num_entries)
#include <filedevice/seadFileDevice.h>
bool sead:: ArchiveFileDevice:: tryReadDirectory(u32* entriesRead,
DirectoryHandle* handle,
DirectoryEntry* entries,
u32 entriesToRead)
#include <filedevice/seadFileDevice.h>
bool sead:: ArchiveFileDevice:: makeDirectory(const SafeString& path,
u32 x)
#include <filedevice/seadFileDevice.h>
bool sead:: ArchiveFileDevice:: tryMakeDirectory(const SafeString& path,
u32)
#include <filedevice/seadFileDevice.h>
bool sead:: ArchiveFileDevice:: makeDirectoryWithParent(const SafeString& path,
u32 x)
#include <filedevice/seadFileDevice.h>
bool sead:: ArchiveFileDevice:: tryMakeDirectoryWithParent(const SafeString& path,
u32)
#include <filedevice/seadFileDevice.h>
s32 sead:: ArchiveFileDevice:: getLastRawError() const
#include <filedevice/seadFileDevice.h>
void sead:: ArchiveFileDevice:: traceFilePath(const SafeString& path) const virtual
#include <filedevice/seadFileDevice.h>
void sead:: ArchiveFileDevice:: traceDirectoryPath(const SafeString& path) const virtual
#include <filedevice/seadFileDevice.h>
void sead:: ArchiveFileDevice:: resolveFilePath(BufferedSafeString* out,
const SafeString& path) const virtual
#include <filedevice/seadFileDevice.h>
void sead:: ArchiveFileDevice:: resolveDirectoryPath(BufferedSafeString* out,
const SafeString& path) const virtual
#include <filedevice/seadFileDevice.h>
bool sead:: ArchiveFileDevice:: isMatchDevice_(const HandleBase* handle) const virtual
#include <filedevice/seadFileDevice.h>
void sead:: ArchiveFileDevice:: erase()
#include <container/seadTList.h>
bool sead:: ArchiveFileDevice:: doSave_(SaveArg& arg) virtual protected
#include <filedevice/seadFileDevice.h>
void sead:: ArchiveFileDevice:: doTracePath_(const SafeString& path) const virtual protected
#include <filedevice/seadFileDevice.h>
void sead:: ArchiveFileDevice:: doResolvePath_(BufferedSafeString* out,
const SafeString& path) const virtual protected
#include <filedevice/seadFileDevice.h>
void sead:: ArchiveFileDevice:: setFileHandleDivSize_(FileHandle* handle,
u32 divSize) const protected
#include <filedevice/seadFileDevice.h>
void sead:: ArchiveFileDevice:: setHandleBaseFileDevice_(HandleBase* handle,
FileDevice* device) const protected
#include <filedevice/seadFileDevice.h>
void sead:: ArchiveFileDevice:: setHandleBaseOriginalFileDevice_(HandleBase* handle,
FileDevice* device) const protected
#include <filedevice/seadFileDevice.h>
HandleBuffer& sead:: ArchiveFileDevice:: getHandleBaseHandleBuffer_(HandleBase* handle) const protected
#include <filedevice/seadFileDevice.h>
Heap* sead:: ArchiveFileDevice:: getDisposerHeap_() const protected
#include <heap/seadDisposer.h>
Variable documentation
static const s32 sead:: ArchiveFileDevice:: cBufferMinAlignment
#include <filedevice/seadFileDevice.h>
FileDevice* sead:: ArchiveFileDevice:: mData
#include <container/seadTList.h>
TList<FileDevice*>* sead:: ArchiveFileDevice:: mList
#include <container/seadTList.h>
FixedSafeString<32> sead:: ArchiveFileDevice:: mDriveName protected
#include <filedevice/seadFileDevice.h>
bool sead:: ArchiveFileDevice:: mPermission protected
#include <filedevice/seadFileDevice.h>