|
libnx
|
Filesystem (fsp-srv) service IPC wrapper. More...
Go to the source code of this file.
Data Structures | |
| struct | FsFileSystem |
| struct | FsFile |
| struct | FsDir |
| struct | FsStorage |
| struct | FsSaveDataIterator |
| struct | FsEventNotifier |
| struct | FsDeviceOperator |
| struct | FsDirectoryEntry |
| Directory entry. More... | |
| struct | FsSave |
| Save Struct. More... | |
| struct | FsSaveDataInfo |
Macros | |
| #define | FS_MAX_PATH 0x301 |
| #define | FS_SAVEDATA_CURRENT_TITLEID 0 |
| For use with FsSave. | |
| #define | FS_SAVEDATA_USERID_COMMONSAVE 0 |
| For use with FsSave and FsSaveDataInfo. | |
Enumerations | |
| enum | FsEntryType { ENTRYTYPE_DIR = 0, ENTRYTYPE_FILE = 1 } |
| enum | FsFileFlags { FS_OPEN_READ = (1U<<( 0 )), FS_OPEN_WRITE = (1U<<( 1 )), FS_OPEN_APPEND = (1U<<( 2 )) } |
| enum | FsDirectoryFlags { FS_DIROPEN_DIRECTORY = (1U<<( 0 )), FS_DIROPEN_FILE = (1U<<( 1 )) } |
| For use with fsFsOpenDirectory. More... | |
| enum | FsStorageId { FsStorageId_None = 0, FsStorageId_Host = 1, FsStorageId_GameCard = 2, FsStorageId_NandSystem = 3, FsStorageId_NandUser = 4, FsStorageId_SdCard = 5 } |
| enum | FsContentStorageId { FS_CONTENTSTORAGEID_NandSystem = 0, FS_CONTENTSTORAGEID_NandUser = 1, FS_CONTENTSTORAGEID_SdCard = 2 } |
| enum | FsSaveDataSpaceId { FsSaveDataSpaceId_NandSystem = 0, FsSaveDataSpaceId_NandUser = 1, FsSaveDataSpaceId_SdCard = 2, FsSaveDataSpaceId_TemporaryStorage = 3, FsSaveDataSpaceId_All = -1 } |
| enum | FsSaveDataType { FsSaveDataType_SystemSaveData = 0, FsSaveDataType_SaveData = 1, FsSaveDataType_BcatDeliveryCacheStorage = 2, FsSaveDataType_DeviceSaveData = 3, FsSaveDataType_TemporaryStorage = 4, FsSaveDataType_CacheStorage = 5 } |
Functions | |
| Result | fsInitialize (void) |
| void | fsExit (void) |
| Service * | fsGetServiceSession (void) |
| Result | fsMountSdcard (FsFileSystem *out) |
| Do not call this directly, see fs_dev.h. | |
| Result | fsMountSaveData (FsFileSystem *out, u8 inval, FsSave *save) |
| Result | fsMountSystemSaveData (FsFileSystem *out, u8 inval, FsSave *save) |
| Result | fsOpenSaveDataIterator (FsSaveDataIterator *out, s32 SaveDataSpaceId) |
| Result | fsOpenDataStorageByCurrentProcess (FsStorage *out) |
| Result | fsOpenDeviceOperator (FsDeviceOperator *out) |
| Result | fsOpenSdCardDetectionEventNotifier (FsEventNotifier *out) |
| Result | fsMount_SaveData (FsFileSystem *out, u64 titleID, u128 userID) |
| FsFileSystem can be mounted with fs_dev for use with stdio, see fs_dev.h. More... | |
| Result | fsMount_SystemSaveData (FsFileSystem *out, u64 saveID) |
| Wrapper for fsMountSystemSaveData. More... | |
| Result | fsFsCreateFile (FsFileSystem *fs, const char *path, size_t size, int flags) |
| Result | fsFsDeleteFile (FsFileSystem *fs, const char *path) |
| Result | fsFsCreateDirectory (FsFileSystem *fs, const char *path) |
| Result | fsFsDeleteDirectory (FsFileSystem *fs, const char *path) |
| Result | fsFsDeleteDirectoryRecursively (FsFileSystem *fs, const char *path) |
| Result | fsFsRenameFile (FsFileSystem *fs, const char *path0, const char *path1) |
| Result | fsFsRenameDirectory (FsFileSystem *fs, const char *path0, const char *path1) |
| Result | fsFsGetEntryType (FsFileSystem *fs, const char *path, FsEntryType *out) |
| Result | fsFsOpenFile (FsFileSystem *fs, const char *path, int flags, FsFile *out) |
| Result | fsFsOpenDirectory (FsFileSystem *fs, const char *path, int flags, FsDir *out) |
| Result | fsFsCommit (FsFileSystem *fs) |
| Result | fsFsGetFreeSpace (FsFileSystem *fs, const char *path, u64 *out) |
| Result | fsFsGetTotalSpace (FsFileSystem *fs, const char *path, u64 *out) |
| void | fsFsClose (FsFileSystem *fs) |
| Result | fsFileRead (FsFile *f, u64 off, void *buf, size_t len, size_t *out) |
| Result | fsFileWrite (FsFile *f, u64 off, const void *buf, size_t len) |
| Result | fsFileFlush (FsFile *f) |
| Result | fsFileSetSize (FsFile *f, u64 sz) |
| Result | fsFileGetSize (FsFile *f, u64 *out) |
| void | fsFileClose (FsFile *f) |
| Result | fsDirRead (FsDir *d, u64 inval, size_t *total_entries, size_t max_entries, FsDirectoryEntry *buf) |
| Result | fsDirGetEntryCount (FsDir *d, u64 *count) |
| void | fsDirClose (FsDir *d) |
| Result | fsStorageRead (FsStorage *s, u64 off, void *buf, size_t len) |
| void | fsStorageClose (FsStorage *s) |
| Result | fsSaveDataIteratorRead (FsSaveDataIterator *s, FsSaveDataInfo *buf, size_t max_entries, size_t *total_entries) |
| Read FsSaveDataInfo data into the buf array. | |
| void | fsSaveDataIteratorClose (FsSaveDataIterator *s) |
| Result | fsEventNotifierGetEventHandle (FsEventNotifier *e, Handle *out) |
| void | fsEventNotifierClose (FsEventNotifier *e) |
| Result | fsDeviceOperatorIsSdCardInserted (FsDeviceOperator *d, bool *out) |
| void | fsDeviceOperatorClose (FsDeviceOperator *d) |
Filesystem (fsp-srv) service IPC wrapper.
Normally applications should just use standard stdio not FS-serv directly. However this can be used if obtaining a FsFileSystem, FsFile, or FsStorage, for mounting with fs_dev/romfs_dev, etc.
| enum FsDirectoryFlags |
| enum FsFileFlags |
| enum FsSaveDataSpaceId |
| enum FsSaveDataType |
| Result fsMount_SaveData | ( | FsFileSystem * | out, |
| u64 | titleID, | ||
| u128 | userID | ||
| ) |
FsFileSystem can be mounted with fs_dev for use with stdio, see fs_dev.h.
Wrapper(s) for fsMountSaveData. See FsSave for titleID and userID.
| Result fsMount_SystemSaveData | ( | FsFileSystem * | out, |
| u64 | saveID | ||
| ) |
Wrapper for fsMountSystemSaveData.
WARNING: You can brick when writing to SystemSaveData, if the data is corrupted etc.
1.8.11