#include <seadFileDevice.h>
Inherits sead::TListNode< FileDevice * >, and sead::IDisposer.
Inherited by sead::ArchiveFileDevice, sead::CafeFSAFileDevice, and sead::MainFileDevice.
Classes | |
| struct | LoadArg |
Public Types | |
| 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 } |
Public Member Functions | |
| FileDevice (const SafeString &default_drive_name) | |
| ~FileDevice () override | |
| const SafeString & | getDriveName () const |
| void | setDriveName (const SafeString &drive_name) |
| void | setPermission (bool permission) |
| bool | hasPermission () const |
| bool | isAvailable () const |
| u8 * | load (LoadArg &arg) |
| u8 * | tryLoad (LoadArg &arg) |
| void | unload (u8 *data) |
| FileDevice * | open (FileHandle *handle, const SafeString &filename, FileOpenFlag flag, u32 div_size) |
| FileDevice * | tryOpen (FileHandle *handle, const SafeString &filename, FileOpenFlag flag, u32 div_size) |
| bool | close (FileHandle *handle) |
| bool | tryClose (FileHandle *handle) |
| u32 | read (FileHandle *handle, u8 *buf, u32 size) |
| bool | tryRead (u32 *read_size, FileHandle *handle, u8 *buf, u32 size) |
| u32 | write (FileHandle *handle, const u8 *buf, u32 size) |
| bool | tryWrite (u32 *write_size, FileHandle *handle, const u8 *buf, u32 size) |
| bool | seek (FileHandle *handle, s32 offset, SeekOrigin origin) |
| bool | trySeek (FileHandle *handle, s32 offset, SeekOrigin origin) |
| u32 | getCurrentSeekPos (FileHandle *handle) |
| bool | tryGetCurrentSeekPos (u32 *pos, FileHandle *handle) |
| u32 | getFileSize (const SafeString &path) |
| u32 | getFileSize (FileHandle *handle) |
| bool | tryGetFileSize (u32 *size, const SafeString &path) |
| bool | tryGetFileSize (u32 *size, FileHandle *handle) |
| bool | isExistFile (const SafeString &path) |
| bool | tryIsExistFile (bool *is_exist, const SafeString &path) |
| bool | isExistDirectory (const SafeString &path) |
| bool | tryIsExistDirectory (bool *is_exist, const SafeString &path) |
| FileDevice * | openDirectory (DirectoryHandle *handle, const SafeString &dirname) |
| FileDevice * | tryOpenDirectory (DirectoryHandle *handle, const SafeString &dirname) |
| bool | closeDirectory (DirectoryHandle *handle) |
| bool | tryCloseDirectory (DirectoryHandle *handle) |
| u32 | readDirectory (DirectoryHandle *handle, DirectoryEntry *entry, u32 num) |
| bool | tryReadDirectory (u32 *read_num, DirectoryHandle *handle, DirectoryEntry *entry, u32 num) |
| bool | makeDirectory (const SafeString &path, u32 permission) |
| bool | tryMakeDirectory (const SafeString &path, u32 permission) |
| bool | makeDirectoryWithParent (const SafeString &path, u32 permission) |
| bool | tryMakeDirectoryWithParent (const SafeString &path, u32 permission) |
| RawErrorCode | getLastRawError () const |
| virtual 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 bool | isMatchDevice_ (const HandleBase *handle) const |
| Public Member Functions inherited from sead::TListNode< FileDevice * > | |
| TListNode () | |
| void | insertBack (TListNode< FileDevice * > *n) |
| void | insertFront (TListNode< FileDevice * > *n) |
| void | erase () |
| Public Member Functions inherited from sead::ListNode | |
| ListNode () | |
| ListNode * | next () const |
| ListNode * | prev () const |
| bool | isLinked () const |
| Public Member Functions inherited from sead::IDisposer | |
| IDisposer () | |
| virtual | ~IDisposer () |
Static Public Attributes | |
| static const s32 | cDriveNameBufferSize = 32 |
| static const s32 | cBufferMinAlignment = 64 |
Protected Member Functions | |
| virtual bool | doIsAvailable_ () const =0 |
| virtual u8 * | doLoad_ (LoadArg &arg) |
| virtual FileDevice * | doOpen_ (FileHandle *handle, const SafeString &filename, FileOpenFlag flag)=0 |
| virtual bool | doClose_ (FileHandle *handle)=0 |
| virtual bool | doRead_ (u32 *read_size, FileHandle *handle, u8 *buf, u32 size)=0 |
| virtual bool | doWrite_ (u32 *write_size, FileHandle *handle, const u8 *buf, u32 size)=0 |
| virtual bool | doSeek_ (FileHandle *handle, s32 offset, SeekOrigin origin)=0 |
| virtual bool | doGetCurrentSeekPos_ (u32 *pos, FileHandle *handle)=0 |
| virtual bool | doGetFileSize_ (u32 *size, const SafeString &path)=0 |
| virtual bool | doGetFileSize_ (u32 *size, FileHandle *handle)=0 |
| virtual bool | doIsExistFile_ (bool *is_exist, const SafeString &path)=0 |
| virtual bool | doIsExistDirectory_ (bool *is_exist, const SafeString &path)=0 |
| virtual FileDevice * | doOpenDirectory_ (DirectoryHandle *handle, const SafeString &dirname)=0 |
| virtual bool | doCloseDirectory_ (DirectoryHandle *handle)=0 |
| virtual bool | doReadDirectory_ (u32 *read_num, DirectoryHandle *handle, DirectoryEntry *entry, u32 num)=0 |
| virtual bool | doMakeDirectory_ (const SafeString &path, u32 permission)=0 |
| virtual RawErrorCode | doGetLastRawError_ () const =0 |
| virtual void | doTracePath_ (const SafeString &path) const |
| virtual void | doResolvePath_ (BufferedSafeString *out, const SafeString &path) const |
| HandleBuffer & | getHandleBaseHandleBuffer_ (HandleBase *handle) const |
| void | setHandleBaseFileDevice_ (HandleBase *handle, FileDevice *device) const |
| void | setHandleBaseOriginalFileDevice_ (HandleBase *handle, FileDevice *device) const |
| void | setFileHandleDivSize_ (FileHandle *handle, u32 div_size) const |
Protected Attributes | |
| FixedSafeString< cDriveNameBufferSize > | mDriveName |
| bool | mPermission |
Friends | |
| class | FileDeviceMgr |
Additional Inherited Members | |
| Public Attributes inherited from sead::TListNode< FileDevice * > | |
| FileDevice * | mData |
| TList< FileDevice * > * | mList |
|
inline |
|
override |
|
inline |
|
inline |
|
inline |
|
inline |
| bool sead::FileDevice::isAvailable | ( | ) | const |
|
inline |
| u8 * sead::FileDevice::tryLoad | ( | LoadArg & | arg | ) |
|
inline |
|
inline |
| FileDevice * sead::FileDevice::tryOpen | ( | FileHandle * | handle, |
| const SafeString & | filename, | ||
| FileOpenFlag | flag, | ||
| u32 | div_size ) |
|
inline |
| bool sead::FileDevice::tryClose | ( | FileHandle * | handle | ) |
|
inline |
| bool sead::FileDevice::tryRead | ( | u32 * | read_size, |
| FileHandle * | handle, | ||
| u8 * | buf, | ||
| u32 | size ) |
|
inline |
| bool sead::FileDevice::tryWrite | ( | u32 * | write_size, |
| FileHandle * | handle, | ||
| const u8 * | buf, | ||
| u32 | size ) |
|
inline |
| bool sead::FileDevice::trySeek | ( | FileHandle * | handle, |
| s32 | offset, | ||
| FileDevice::SeekOrigin | origin ) |
|
inline |
| bool sead::FileDevice::tryGetCurrentSeekPos | ( | u32 * | pos, |
| FileHandle * | handle ) |
|
inline |
|
inline |
| bool sead::FileDevice::tryGetFileSize | ( | u32 * | size, |
| const SafeString & | path ) |
| bool sead::FileDevice::tryGetFileSize | ( | u32 * | size, |
| FileHandle * | handle ) |
|
inline |
| bool sead::FileDevice::tryIsExistFile | ( | bool * | is_exist, |
| const SafeString & | path ) |
|
inline |
| bool sead::FileDevice::tryIsExistDirectory | ( | bool * | is_exist, |
| const SafeString & | path ) |
|
inline |
| FileDevice * sead::FileDevice::tryOpenDirectory | ( | DirectoryHandle * | handle, |
| const SafeString & | dirname ) |
|
inline |
| bool sead::FileDevice::tryCloseDirectory | ( | DirectoryHandle * | handle | ) |
|
inline |
| bool sead::FileDevice::tryReadDirectory | ( | u32 * | read_num, |
| DirectoryHandle * | handle, | ||
| DirectoryEntry * | entry, | ||
| u32 | num ) |
|
inline |
| bool sead::FileDevice::tryMakeDirectory | ( | const SafeString & | path, |
| u32 | permission ) |
|
inline |
| bool sead::FileDevice::tryMakeDirectoryWithParent | ( | const SafeString & | path, |
| u32 | permission ) |
| RawErrorCode sead::FileDevice::getLastRawError | ( | ) | const |
|
inlinevirtual |
Reimplemented in sead::MainFileDevice.
|
inlinevirtual |
Reimplemented in sead::MainFileDevice.
|
inlinevirtual |
Reimplemented in sead::MainFileDevice.
|
inlinevirtual |
Reimplemented in sead::MainFileDevice.
|
virtual |
Reimplemented in sead::MainFileDevice.
|
protectedpure virtual |
Implemented in sead::ArchiveFileDevice, sead::CafeFSAFileDevice, and sead::MainFileDevice.
|
protectedvirtual |
Reimplemented in sead::ArchiveFileDevice.
|
protectedpure virtual |
Implemented in sead::ArchiveFileDevice, sead::CafeFSAFileDevice, and sead::MainFileDevice.
|
protectedpure virtual |
Implemented in sead::ArchiveFileDevice, sead::CafeFSAFileDevice, and sead::MainFileDevice.
|
protectedpure virtual |
Implemented in sead::ArchiveFileDevice, sead::CafeFSAFileDevice, and sead::MainFileDevice.
|
protectedpure virtual |
Implemented in sead::ArchiveFileDevice, sead::CafeFSAFileDevice, and sead::MainFileDevice.
|
protectedpure virtual |
Implemented in sead::ArchiveFileDevice, sead::CafeFSAFileDevice, and sead::MainFileDevice.
|
protectedpure virtual |
Implemented in sead::ArchiveFileDevice, sead::CafeFSAFileDevice, and sead::MainFileDevice.
|
protectedpure virtual |
Implemented in sead::ArchiveFileDevice, sead::CafeFSAFileDevice, and sead::MainFileDevice.
|
protectedpure virtual |
Implemented in sead::ArchiveFileDevice, sead::CafeFSAFileDevice, and sead::MainFileDevice.
|
protectedpure virtual |
Implemented in sead::ArchiveFileDevice, sead::CafeFSAFileDevice, and sead::MainFileDevice.
|
protectedpure virtual |
Implemented in sead::ArchiveFileDevice, sead::CafeFSAFileDevice, and sead::MainFileDevice.
|
protectedpure virtual |
Implemented in sead::ArchiveFileDevice, sead::CafeFSAFileDevice, and sead::MainFileDevice.
|
protectedpure virtual |
Implemented in sead::ArchiveFileDevice, sead::CafeFSAFileDevice, and sead::MainFileDevice.
|
protectedpure virtual |
Implemented in sead::ArchiveFileDevice, sead::CafeFSAFileDevice, and sead::MainFileDevice.
|
protectedpure virtual |
Implemented in sead::ArchiveFileDevice, sead::CafeFSAFileDevice, and sead::MainFileDevice.
|
protectedpure virtual |
Implemented in sead::ArchiveFileDevice, sead::CafeFSAFileDevice, and sead::MainFileDevice.
|
protectedvirtual |
|
protectedvirtual |
Reimplemented in sead::CafeFSAFileDevice.
|
protected |
|
protected |
|
protected |
|
protected |
|
friend |
|
static |
|
static |
|
protected |
|
protected |