FS_ARCHIVE_READ_FUNC, FS_ARCHIVE_WRITE_FUNC

Definition

#include <nitro/fs.h>

typedef FSResult (*FS_ARCHIVE_READ_FUNC)(struct FSArchive *p, void *dst, u32 pos, u32 size);
typedef FSResult (*FS_ARCHIVE_WRITE_FUNC)(struct FSArchive *p, const void *src, u32 pos, u32 size);


Description

Defines the function format of the basic access callback specified in the archive. The file system uses these two callbacks and either FAT or FNT information to assume the existence of linear memory space based on NitroROM format. The default packages of all of the commands of the file systems are constructed with this callback. FS_ARCHIVE_READ_FUNC specifies the function that processes for reading only size BYTE from the archive offset pos location to the memory buffer dst. FS_ARCHIVE_WRITE_FUNC specifies the function that processes for writing only size BYTE from the archive offset pos location to the memory buffer src. If processing is completed synchronously during call, FS_RESULT_SUCCESS is returned, regardless of the callback. When completed asynchronously outside the function, FS_RESULT_PROC_ASYNC must be returned. Also, when FS_RESULT_PROC_ASYNC is returned, you must call the FS_NotifyArchiveAsyncEnd function upon completion.


See Also

FSResult, FSArchive, FS_LoadArchive, FS_NotifyArchiveAsyncEnd, FS_ARCHIVE_READ_FUNC, FS_ARCHIVE_WRITE_FUNC

Revision History

07/12/2004 Changed the return value type
06/30/2004 Initial Version