NinHostIOFileDevice class
Base classes
- class NinFileDeviceBase
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 }
- 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
Public functions
- auto doIsAvailable_() const -> bool override
- auto formatPathForFS_(BufferedSafeString* out, const SafeString& path) const -> bool override
- 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 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& path) -> bool override
- auto doRead_(u32* bytesRead, FileHandle* handle, u8* outBuffer, u32 bytesToRead) -> bool override
- auto doWrite_(u32* bytesWritten, FileHandle* handle, const u8* inBuffer, u32 bytesToWrite) -> 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* entries, u32 entriesToRead) -> bool override
- auto doMakeDirectory_(const SafeString& path, u32 u_32) -> bool override
- auto doGetLastRawError_() const -> s32 override
- void doResolvePath_(BufferedSafeString* out, const SafeString& path) const override
- auto getFileHandleInner_(HandleBase* handle, bool construct = false) const -> FileHandleInner*
- auto getDirectoryHandleInner_(HandleBase* handle, bool construct = false) const -> DirectoryHandleInner*
- auto doLoad_(LoadArg& arg) -> u8* virtual
- auto doSave_(SaveArg& arg) -> bool virtual
- void doTracePath_(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
Enum documentation
enum sead:: NinHostIOFileDevice:: FileOpenFlag
#include <filedevice/seadFileDevice.h>
enum sead:: NinHostIOFileDevice:: SeekOrigin
#include <filedevice/seadFileDevice.h>
enum class sead:: NinHostIOFileDevice:: HeapNullOption
#include <heap/seadDisposer.h>
Function documentation
static u32 sead:: NinHostIOFileDevice:: getListNodeOffset()
#include <heap/seadDisposer.h>
const SafeString& sead:: NinHostIOFileDevice:: getDriveName() const
#include <filedevice/seadFileDevice.h>
void sead:: NinHostIOFileDevice:: setDriveName(const SafeString& name)
#include <filedevice/seadFileDevice.h>
bool sead:: NinHostIOFileDevice:: hasPermission() const
#include <filedevice/seadFileDevice.h>
void sead:: NinHostIOFileDevice:: setHasPermission(bool perm)
#include <filedevice/seadFileDevice.h>
bool sead:: NinHostIOFileDevice:: isAvailable() const
#include <filedevice/seadFileDevice.h>
u8* sead:: NinHostIOFileDevice:: tryLoad(LoadArg& arg)
#include <filedevice/seadFileDevice.h>
bool sead:: NinHostIOFileDevice:: save(SaveArg& arg)
#include <filedevice/seadFileDevice.h>
bool sead:: NinHostIOFileDevice:: trySave(SaveArg& arg)
#include <filedevice/seadFileDevice.h>
FileDevice* sead:: NinHostIOFileDevice:: open(FileHandle* handle,
const SafeString& path,
FileOpenFlag flag,
u32 divSize = 0)
#include <filedevice/seadFileDevice.h>
FileDevice* sead:: NinHostIOFileDevice:: tryOpen(FileHandle* handle,
const SafeString& path,
FileOpenFlag flag,
u32 divSize = 0)
#include <filedevice/seadFileDevice.h>
bool sead:: NinHostIOFileDevice:: close(FileHandle* handle)
#include <filedevice/seadFileDevice.h>
bool sead:: NinHostIOFileDevice:: tryClose(FileHandle* handle)
#include <filedevice/seadFileDevice.h>
bool sead:: NinHostIOFileDevice:: flush(FileHandle* handle)
#include <filedevice/seadFileDevice.h>
bool sead:: NinHostIOFileDevice:: tryFlush(FileHandle* handle)
#include <filedevice/seadFileDevice.h>
bool sead:: NinHostIOFileDevice:: remove(const SafeString& str)
#include <filedevice/seadFileDevice.h>
bool sead:: NinHostIOFileDevice:: tryRemove(const SafeString& str)
#include <filedevice/seadFileDevice.h>
u32 sead:: NinHostIOFileDevice:: read(FileHandle* handle,
u8* data,
u32 size)
#include <filedevice/seadFileDevice.h>
bool sead:: NinHostIOFileDevice:: tryRead(u32* bytesRead,
FileHandle* handle,
u8* outBuffer,
u32 bytesToRead)
#include <filedevice/seadFileDevice.h>
u32 sead:: NinHostIOFileDevice:: write(FileHandle* handle,
const u8* data,
u32 size)
#include <filedevice/seadFileDevice.h>
bool sead:: NinHostIOFileDevice:: tryWrite(u32* bytesWritten,
FileHandle* handle,
const u8* inBuffer,
u32 bytesToWrite)
#include <filedevice/seadFileDevice.h>
bool sead:: NinHostIOFileDevice:: seek(FileHandle* handle,
s32 offset,
SeekOrigin origin)
#include <filedevice/seadFileDevice.h>
bool sead:: NinHostIOFileDevice:: trySeek(FileHandle* handle,
s32 offset,
SeekOrigin origin)
#include <filedevice/seadFileDevice.h>
u32 sead:: NinHostIOFileDevice:: getCurrentSeekPos(FileHandle* handle)
#include <filedevice/seadFileDevice.h>
bool sead:: NinHostIOFileDevice:: tryGetCurrentSeekPos(u32* seekPos,
FileHandle* handle)
#include <filedevice/seadFileDevice.h>
u32 sead:: NinHostIOFileDevice:: getFileSize(const SafeString& path)
#include <filedevice/seadFileDevice.h>
u32 sead:: NinHostIOFileDevice:: getFileSize(FileHandle* handle)
#include <filedevice/seadFileDevice.h>
bool sead:: NinHostIOFileDevice:: tryGetFileSize(u32* fileSize,
const SafeString& path)
#include <filedevice/seadFileDevice.h>
bool sead:: NinHostIOFileDevice:: tryGetFileSize(u32* size,
FileHandle* handle)
#include <filedevice/seadFileDevice.h>
bool sead:: NinHostIOFileDevice:: isExistFile(const SafeString& path)
#include <filedevice/seadFileDevice.h>
bool sead:: NinHostIOFileDevice:: tryIsExistFile(bool* exists,
const SafeString& path)
#include <filedevice/seadFileDevice.h>
bool sead:: NinHostIOFileDevice:: isExistDirectory(const SafeString& path)
#include <filedevice/seadFileDevice.h>
bool sead:: NinHostIOFileDevice:: tryIsExistDirectory(bool* exists,
const SafeString& path)
#include <filedevice/seadFileDevice.h>
FileDevice* sead:: NinHostIOFileDevice:: openDirectory(DirectoryHandle* handle,
const SafeString& path)
#include <filedevice/seadFileDevice.h>
FileDevice* sead:: NinHostIOFileDevice:: tryOpenDirectory(DirectoryHandle* handle,
const SafeString& path)
#include <filedevice/seadFileDevice.h>
bool sead:: NinHostIOFileDevice:: closeDirectory(DirectoryHandle* handle)
#include <filedevice/seadFileDevice.h>
bool sead:: NinHostIOFileDevice:: tryCloseDirectory(DirectoryHandle* handle)
#include <filedevice/seadFileDevice.h>
u32 sead:: NinHostIOFileDevice:: readDirectory(DirectoryHandle* handle,
DirectoryEntry* entries,
u32 num_entries)
#include <filedevice/seadFileDevice.h>
bool sead:: NinHostIOFileDevice:: tryReadDirectory(u32* entriesRead,
DirectoryHandle* handle,
DirectoryEntry* entries,
u32 entriesToRead)
#include <filedevice/seadFileDevice.h>
bool sead:: NinHostIOFileDevice:: makeDirectory(const SafeString& path,
u32 x)
#include <filedevice/seadFileDevice.h>
bool sead:: NinHostIOFileDevice:: tryMakeDirectory(const SafeString& path,
u32)
#include <filedevice/seadFileDevice.h>
bool sead:: NinHostIOFileDevice:: makeDirectoryWithParent(const SafeString& path,
u32 x)
#include <filedevice/seadFileDevice.h>
bool sead:: NinHostIOFileDevice:: tryMakeDirectoryWithParent(const SafeString& path,
u32)
#include <filedevice/seadFileDevice.h>
s32 sead:: NinHostIOFileDevice:: getLastRawError() const
#include <filedevice/seadFileDevice.h>
void sead:: NinHostIOFileDevice:: traceFilePath(const SafeString& path) const virtual
#include <filedevice/seadFileDevice.h>
void sead:: NinHostIOFileDevice:: traceDirectoryPath(const SafeString& path) const virtual
#include <filedevice/seadFileDevice.h>
void sead:: NinHostIOFileDevice:: resolveFilePath(BufferedSafeString* out,
const SafeString& path) const virtual
#include <filedevice/seadFileDevice.h>
void sead:: NinHostIOFileDevice:: resolveDirectoryPath(BufferedSafeString* out,
const SafeString& path) const virtual
#include <filedevice/seadFileDevice.h>
bool sead:: NinHostIOFileDevice:: isMatchDevice_(const HandleBase* handle) const virtual
#include <filedevice/seadFileDevice.h>
void sead:: NinHostIOFileDevice:: erase()
#include <container/seadTList.h>
FileDevice* sead:: NinHostIOFileDevice:: doOpen_(FileHandle* handle,
const SafeString& path,
FileOpenFlag flag) override protected
bool sead:: NinHostIOFileDevice:: doClose_(FileHandle* handle) override protected
bool sead:: NinHostIOFileDevice:: doFlush_(FileHandle* handle) override protected
bool sead:: NinHostIOFileDevice:: doRemove_(const SafeString& path) override protected
bool sead:: NinHostIOFileDevice:: doRead_(u32* bytesRead,
FileHandle* handle,
u8* outBuffer,
u32 bytesToRead) override protected
bool sead:: NinHostIOFileDevice:: doWrite_(u32* bytesWritten,
FileHandle* handle,
const u8* inBuffer,
u32 bytesToWrite) override protected
bool sead:: NinHostIOFileDevice:: doSeek_(FileHandle* handle,
s32 offset,
SeekOrigin origin) override protected
bool sead:: NinHostIOFileDevice:: doGetCurrentSeekPos_(u32* seekPos,
FileHandle* handle) override protected
bool sead:: NinHostIOFileDevice:: doGetFileSize_(u32* fileSize,
const SafeString& path) override protected
bool sead:: NinHostIOFileDevice:: doGetFileSize_(u32* fileSize,
FileHandle* handle) override protected
bool sead:: NinHostIOFileDevice:: doIsExistFile_(bool* exists,
const SafeString& path) override protected
bool sead:: NinHostIOFileDevice:: doIsExistDirectory_(bool* exists,
const SafeString& path) override protected
FileDevice* sead:: NinHostIOFileDevice:: doOpenDirectory_(DirectoryHandle* handle,
const SafeString& path) override protected
bool sead:: NinHostIOFileDevice:: doCloseDirectory_(DirectoryHandle* handle) override protected
bool sead:: NinHostIOFileDevice:: doReadDirectory_(u32* entriesRead,
DirectoryHandle* handle,
DirectoryEntry* entries,
u32 entriesToRead) override protected
bool sead:: NinHostIOFileDevice:: doMakeDirectory_(const SafeString& path,
u32 u_32) override protected
s32 sead:: NinHostIOFileDevice:: doGetLastRawError_() const override protected
void sead:: NinHostIOFileDevice:: doResolvePath_(BufferedSafeString* out,
const SafeString& path) const override protected
FileHandleInner* sead:: NinHostIOFileDevice:: getFileHandleInner_(HandleBase* handle,
bool construct = false) const protected
DirectoryHandleInner* sead:: NinHostIOFileDevice:: getDirectoryHandleInner_(HandleBase* handle,
bool construct = false) const protected
u8* sead:: NinHostIOFileDevice:: doLoad_(LoadArg& arg) virtual protected
#include <filedevice/seadFileDevice.h>
bool sead:: NinHostIOFileDevice:: doSave_(SaveArg& arg) virtual protected
#include <filedevice/seadFileDevice.h>
void sead:: NinHostIOFileDevice:: doTracePath_(const SafeString& path) const virtual protected
#include <filedevice/seadFileDevice.h>
void sead:: NinHostIOFileDevice:: setFileHandleDivSize_(FileHandle* handle,
u32 divSize) const protected
#include <filedevice/seadFileDevice.h>
void sead:: NinHostIOFileDevice:: setHandleBaseFileDevice_(HandleBase* handle,
FileDevice* device) const protected
#include <filedevice/seadFileDevice.h>
void sead:: NinHostIOFileDevice:: setHandleBaseOriginalFileDevice_(HandleBase* handle,
FileDevice* device) const protected
#include <filedevice/seadFileDevice.h>
HandleBuffer& sead:: NinHostIOFileDevice:: getHandleBaseHandleBuffer_(HandleBase* handle) const protected
#include <filedevice/seadFileDevice.h>
Heap* sead:: NinHostIOFileDevice:: getDisposerHeap_() const protected
#include <heap/seadDisposer.h>
Variable documentation
static const s32 sead:: NinHostIOFileDevice:: cBufferMinAlignment
#include <filedevice/seadFileDevice.h>
FileDevice* sead:: NinHostIOFileDevice:: mData
#include <container/seadTList.h>
TList<FileDevice*>* sead:: NinHostIOFileDevice:: mList
#include <container/seadTList.h>
nn:: Result sead:: NinHostIOFileDevice:: mLastError protected
SafeString sead:: NinHostIOFileDevice:: mMountPoint protected
FixedSafeString<32> sead:: NinHostIOFileDevice:: mDriveName protected
#include <filedevice/seadFileDevice.h>
bool sead:: NinHostIOFileDevice:: mPermission protected
#include <filedevice/seadFileDevice.h>