5#include <revolution/FS.h>
10#define NAND_BANNER_TITLE_MAX 32
11#define NAND_BANNER_ICON_MAX_FRAME 8
17 NAND_RESULT_FATAL_ERROR = -128,
18 NAND_RESULT_UNKNOWN = -64,
20 NAND_RESULT_MAXDEPTH = -16,
21 NAND_RESULT_AUTHENTICATION,
27 NAND_RESULT_MAXBLOCKS,
30 NAND_RESULT_EXISTS = -6,
34 NAND_RESULT_ALLOC_FAILED,
61 NAND_PERM_RUSR = (NAND_ACCESS_READ << 4),
62 NAND_PERM_WUSR = (NAND_ACCESS_WRITE << 4),
64 NAND_PERM_RGRP = (NAND_ACCESS_READ << 2),
65 NAND_PERM_WGRP = (NAND_ACCESS_WRITE << 2),
67 NAND_PERM_ROTH = (NAND_ACCESS_READ << 0),
68 NAND_PERM_WOTH = (NAND_ACCESS_WRITE << 0),
70 NAND_PERM_RALL = NAND_PERM_RUSR | NAND_PERM_RGRP | NAND_PERM_ROTH,
71 NAND_PERM_WALL = NAND_PERM_WUSR | NAND_PERM_WGRP | NAND_PERM_WOTH,
72 NAND_PERM_RWALL = NAND_PERM_RALL | NAND_PERM_WALL
87 char openPath[FS_MAX_PATH];
88 char tempPath[FS_MAX_PATH];
96 NANDAsyncCallback callback;
109 char path[FS_MAX_PATH];
133 u8 reserved[0x20 - 0xA];
134 wchar_t title[NAND_BANNER_TITLE_MAX];
135 wchar_t subtitle[NAND_BANNER_TITLE_MAX];
136 u8 bannerTexture[0x6000];
137 u8 iconTexture[0x1200][NAND_BANNER_ICON_MAX_FRAME];
140s32 NANDCreate(
const char* path, u8 perm, u8 attr);
141s32 NANDPrivateCreate(
const char* path, u8 perm, u8 attr);
142s32 NANDPrivateCreateAsync(
const char* path, u8 perm, u8 attr,
145s32 NANDDelete(
const char* path);
146s32 NANDPrivateDelete(
const char* path);
147s32 NANDPrivateDeleteAsync(
const char* path, NANDAsyncCallback callback,
151s32 NANDReadAsync(
NANDFileInfo* info,
void* buf, u32 len,
154s32 NANDWrite(
NANDFileInfo* info,
const void* buf, u32 len);
155s32 NANDWriteAsync(
NANDFileInfo* info,
const void* buf, u32 len,
158s32 NANDSeek(
NANDFileInfo* info, s32 offset, NANDSeekMode whence);
159s32 NANDSeekAsync(
NANDFileInfo* info, s32 offset, NANDSeekMode whence,
162s32 NANDPrivateCreateDir(
const char* path, u8 perm, u8 attr);
163s32 NANDPrivateCreateDirAsync(
const char* path, u8 perm, u8 attr,
164 NANDAsyncCallback callback,
167s32 NANDMove(
const char* from,
const char* to);
170s32 NANDGetLengthAsync(
NANDFileInfo* info, u32* lengthOut,
173s32 NANDGetStatus(
const char* path,
NANDStatus* status);
174s32 NANDPrivateGetStatusAsync(
const char* path,
NANDStatus* status,
175 NANDAsyncCallback callback,