

FSResult FS_ARCHIVE_PROC_FUNC(FSFile *p_file, FSCommandType command /*
= FS_COMMAND_WRITEFILE */);
Operating specifications for the archive command FS_COMMAND_WRITEFILE are shown below:
This command takes as a command argument the variablearg.readfilethat is stored inp_file.
This variable is defined innitro/fs/file.has shown below: typedef struct { const void *src; u32 len_org; u32 len; } FSWriteFileInfo;
Argument content is listed below:
| Arguments | Content |
| src | The memory address for the source data to be written to a file. |
| len_org | Indicates the size of data to write (bytes), using the specified value as is. |
| len | Specifies the size of data to be written (bytes), using a value that is adjusted by the file size at the time that the command is called. |
p_fileis a handle that always holds file information inprop.file.
Based onp_file'sprog.filevariable, the command makes the following settings: Transferslenbytes of data from memory indicated bysrcto an archive offset position that is indicated byprop.file.pos. Adds value oflentoprop.file.pos.
The value len is adjusted from the specified value, takingprop.file.bottominto consideration. If you want to run a special process when a write exceeds the file size, you can use the original value that is stored inlen_org.
Uses the archive write callback function to transferlenbytes fromsrcto the base offset position indicated byprop.file.pos. Adds value oflentoprop.file.pos.
IfFS_RESULT_SUCCESSis returned by the command, it will be determined that the transfer process forlenbytes completed properly. When anything else is returned by the command, it will be determined that transfer failed due to some error.
FS_WriteFile FS_WriteFileAsync
FSArchive, FS_ARCHIVE_PROC_FUNC, FS_COMMAND_*, FS_SetArchiveProc
2004/07/12 Initial version.
CONFIDENTIAL