FS_RegisterArchiveName

C Specification

#include <nitro/fs.h>

BOOL FS_RegisterArchiveName(FSArchive *p_arc, const char *name, u32 name_len);

Arguments

p_arc Address of the FSArchive structure
name Pointer to the character string containing the name being registered
name_len The string length of name

Return Values

TRUE if the archive with the specified name has been correctly registered in the file system. FALSE otherwise.

Description

Registers the archive in the file system using the specified name. Only alphanumeric characters can be used for name. Not case-sensitive—all characters are treated as lowercase.
If the end character (\0) is included in the string for name at some position that makes name shorter than specified by name_len, then that shorter length is used.
The function fails if an empty string "" is specified or if name_len is longer than FS_ARCHIVE_NAME_LEN_MAX.

The function also fails if the value of name is already registered in the file system.
You cannot use "rom" as a name because the file system registers an archive with the name "rom" when the FS_Init function executes.
The registered archive can be loaded to the file system with the FS_LoadArchive function.
There are no restrictions regarding the time between registering a name and actually loading the archive.
Furthermore, you can use the same name any number of times by repeatedly loading it and unloading it.


See Also

FSArchive, FS_ARCHIVE_NAME_LEN_MAX, FS_ReleaseArchiveName, FS_LoadArchive, FS_UnloadArchive

Revision History

06/30/2004 Initial version.