FSResult FS_ARCHIVE_PROC_FUNC(FSFile *p_file, FSCommandType command /* = FS_COMMAND_GETPATH */);
Operating specifications for the archive command FS_COMMAND_GETPATH are shown below:
This command takes as a command argument the variablearg.getpaththat is stored inp_file. This variable is defined innitro/fs/file.has shown below:typedef struct { u8 *buf; u32 buf_len; u16 total_len; u16 dir_id; } FSGetPathInfo;
Argument content is listed below:
| Arguments | Content |
buf |
This indicates a pointer to the memory that stores the acquired absolute path name character string. If this value is NULL, there is no need to acquire an absolute path name character string. |
buf_len |
This indicates the memory size of buf (bytes). |
total_len |
This indicates the length of a valid absolute path name character string that has already been calculated. If this value is 0, you must configure properly. |
dir_id |
If the target is a directory, this indicates a position; if the target is a file, this indicates the position of the directory to which it belongs. If total_length is 0, you must correctly set the value. |
p_fileholds either file information or directory position information. You can determine which it holds with theFS_IsFilefunction or theFS_IsDirfunction. The argument variables are set as shown below: If the argumenttotal_lenis0, the length of the absolute path name character string indicated byp_file, including the terminating '\0', will be set intotal_len. Ifp_fileis a directory its value will be set indir_id; ifp_fileis a file, the position of the directory that it belongs to will be set indir_id. Iftotal_lenis not0, it is assured that this command has already made this setting. If the argumentbufis notNULL, the absolute path name character string indicated byp_file, including the terminating '\0' will be stored in memory. However, ifbuf_lenis less thantotal_len,FS_RESULT_FAILUREmust be returned. At this time, it is possible to either store as much of the character string as possible, or store nothing.
Seek results from the provided arguments, using only theFS_COMMAND_SEEKDIRandFS_COMMAND_READDIRcommands.
IfFS_RESULT_SUCCESSis returned by the command, it is determined that a valid absolute path name character string length has been set intotal_len. If buf is not NULL, the absolute path name character string, including the terminating '\0' has been stored. Otherwise it will be determined thatbufis notNULL, and thatbuf_lenis less thantotal_len.
FS_GetPathLengthFS_GetPathName
FSArchive, FS_ARCHIVE_PROC_FUNC, FS_COMMAND_*, FS_SetArchiveProc
08/25/2004 Corrected error: FSIdFile is changed to FS_IsFile.
07/12/2004 Initial version.
CONFIDENTIAL