#include <nitro/fs.h>
typedef enum {
FS_COMMAND_ASYNC_BEGIN = 0,
FS_COMMAND_READFILE = FS_COMMAND_ASYNC_BEGIN,
FS_COMMAND_WRITEFILE,
FS_COMMAND_ASYNC_END,
FS_COMMAND_SYNC_BEGIN = FS_COMMAND_ASYNC_END,
FS_COMMAND_SEEKDIR = FS_COMMAND_SYNC_BEGIN,
FS_COMMAND_READDIR,
FS_COMMAND_FINDPATH,
FS_COMMAND_GETPATH,
FS_COMMAND_OPENFILEFAST,
FS_COMMAND_OPENFILEDIRECT,
FS_COMMAND_CLOSEFILE,
FS_COMMAND_SYNC_END,
FS_COMMAND_STATUS_BEGIN = FS_COMMAND_SYNC_END,
FS_COMMAND_ACTIVATE = FS_COMMAND_STATUS_BEGIN,
FS_COMMAND_IDLE,
FS_COMMAND_STATUS_END,
FS_COMMAND_INVALID
} FSCommandType;
Enumerator types represent commands sent by the file system for the archive. They are defined as follows.
FS_COMMAND_STATUS_BEGIN | Shows the beginning of the message command ID regarding changes to the archive state. | |
FS_COMMAND_STATUS_END | Shows the end + 1 of the message command ID regarding changes to the archive state. |
|
Below are messages included in FS_COMMAND_STATUS_BEGIN to FS_COMMAND_STATUS_END . |
||
FS_COMMAND_ACTIVATE | Generates before the idle state archive begins initial processing. | |
FS_COMMAND_IDLE | Generates after the archive finishes final processing and enters the idle state. | |
FS_COMMAND_SYNC_BEGIN | Shows beginning of the synchronous command ID. | |
FS_COMMAND_SYNC_END | Shows end + 1 of the synchronous command ID. | |
Below are messages included in FS_COMMAND_SYNC_BEGIN to FS_COMMAND_SYNC_END . |
||
FS_COMMAND_SEEKDIR | Generates as a command from the function required to look up the directory position. | |
FS_COMMAND_READDIR | Generates as a command from the function required to read the directory entry. | |
FS_COMMAND_OPENFILEDIRECT | Generates as a command from the function required to open the file by directly assigning the area. | |
FS_COMMAND_OPENFILEFAST | Generates as a command from the function required to open the file by file ID. | |
FS_COMMAND_CLOSEFILE | Generates as a command from the function required to close the file. | |
FS_COMMAND_FINDPATH | Generates as a command from the function specifying the directory and file by path name. | |
FS_COMMAND_GETPATH | Generates as a command from the function requiring the full path name or its length. | |
FS_COMMAND_ASYNC_BEGIN | Shows the beginning of the asynchronous command ID. | |
FS_COMMAND_ASYNC_END | Shows the end + 1 of the asynchronous command ID. |
|
Below are messages included in FS_COMMAND_ASYNC_BEGIN to FS_COMMAND_ASYNC_END are below. |
||
FS_COMMAND_READFILE | Generates as the command from the function required to read access the file. | |
FS_COMMAND_WRITEFILE | Generates as the command from the function required to write access the file. | |
FS_COMMAND_INVALID | Provided as the internal constant for showing invalid commands. |
Asynchronous commands are commands that complete by calling once the callback function of the archive.
Synchronous commands are commands added to the call of the callback function and that require some processing.
There are dependent relationships in the synchronous commands in the default package, and some commands use lower commands internally.
Dependent relationships among commands are generally as follows.
No. | Commands | Command or Archive Information to Use | ||||||||||||||
1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | ||
1 | FS_ARCHIVE_READ_FUNC ) |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
2 | FS_ARCHIVE_WRITE_FUNC ) |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
3 | ( FAT Information ) | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
4 | ( FNT Information ) | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
5 | FS_COMMAND_ACTIVATE | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
6 | FS_COMMAND_IDLE | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
7 | FS_COMMAND_SEEKDIR | › | | | | | › | | | | | | | | | | | | | | | | | | | | | | |
8 | FS_COMMAND_READDIR | › | | | | | › | | | | | | | | | | | | | | | | | | | | | | |
9 | FS_COMMAND_OPENFILEDIRECT | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
10 | FS_COMMAND_OPENFILEFAST | › | | | › | | | | | | | | | | | › | | | | | | | | | | | | |
11 | FS_COMMAND_CLOSEFILE | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
12 | FS_COMMAND_FINDPATH | | | | | | | | | | | | | › | › | | | | | | | | | | | | | | |
13 | FS_COMMAND_GETPATH | | | | | | | | | | | | | › | › | | | | | | | | | | | | | | |
14 | FS_COMMAND_READFILE | › | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
15 | FS_COMMAND_WRITEFILE | | | › | | | | | | | | | | | | | | | | | | | | | | | | | | |
FSArchive FS_ARCHIVE_PROC_FUNC
FS_SetArchiveProc
07/12/2004 Corrected all command descriptions
06/30/2004 Initial version