FSResult FS_ARCHIVE_PROC_FUNC(
FSFile *p_file,
FSCommandType command /* = FS_COMMAND_READDIR */);
Operating specifications for the archive command FS_COMMAND_READDIR are shown below:
arg.readdir that is stored in p_file.nitro/fs/file.h as shown below:
typedef struct
{
FSDirEntry *p_entry;
BOOL skip_string;
} FSReadDirInfo;
| Arguments | Content |
|---|---|
p_entry |
Pointer to the FSDirEntry structure that stores directory information.Command results are stored in the memory that is indicated by this pointer. |
skip_string |
Unless this value is FALSE, you must store name character strings in the p_entry's name buffer. |
p_file is a handle that always holds directory position information in prop.dir. Based on p_file's prog.dir variable, the command makes the following settings:
FSDirEntry structure that is identfied by the p_entry argument.
p_file is file information, it sets p_entry->is_directory to 0, and sets the file ID in p_entry->file_id.FS_COMMAND_OPENFILEFAST commands.p_file points to is directory information, it sets p_entry->is_directory to 1, and sets the directory position in p_entry->dir_id.FS_COMMAND_SEEKDIR commands.p_entry->skip_string is FALSE, it will store the file name or directory name, including the terminating '\0' in p_entry->name.p_entry->name_len.p_file directory position information. Subsequently, this information is used by the FS_COMMAND_SEEKDIR and FS_COMMAND_READDIR commands.p_entry->is_directory |
If the next directory is a file, 0; if it is a directory, 1. |
p_entry->file_id |
File ID (only if the next directory entry is a file) Index is set as prop.dir.index. |
p_entry->dir_id |
Directory position (used only if the next directory entry is a directory) The top is set by index = 0, pos = 0. |
p_entry->name_len |
Name character string length of the next directory entry. |
p_entry->name |
Name character string of the next directory entry. |
prop.dir.pos.pos.
FS_RESULT_SUCCESS is returned by the command, then the current directory entry has been properly stored at the address indicated by the argument p_entry.p_file.FS_ReadDirFS_FINDPATH command)FS_ChangeDirFS_OpenFileFS_ConvertPathToFileID
( indirectly from the default FS_GETPATH command)FS_GetPathNameFS_GetPathLengthFSArchive, FS_ARCHIVE_PROC_FUNC, FS_COMMAND_*, FS_SetArchiveProc
07/28/2004 Revised "if skip_string is not FALSE" to "if skip_string is FALSE"
07/12/2004 Initial Version