DVDConvertPathToEntrynum

C Specification

#include <revolution/dvd.h>

s32 DVDConvertPathToEntrynum(const char* fileName);

Arguments

fileName Pointer to file name to convert.

Return Values

Returns the entry number if the files is found and returns -1 if the files is not found.

Description

Converts a file name to an entry number. The entry number is a unique number assigned to a file. Once an entry number is obtained for a file, you can call the DVDFastOpen function which is faster than the DVDOpen function to open the file.

This function can also check if files exist. If fileName doesn't exist, you can check for the file easily because the DVDConvertPathToEntrynum function returns -1. Using the DVDOpen function for this purpose isn't a good method. Because the DVDOpen function displays a warning message if the specified file doesn't exist. Even if fileName doesn't exist, the DVDConvertPathToEntrynum function won't display anything.

Because the DVDConvertPathToEntrynum function returns a unique entry number, you can use the number for your own purposes (for example, a file ID to manage your own file cache system). Note that this number can change with the next ndrun (especially after you add/delete/move files or change the disc layout).

See Also

DVDFastOpen

Revision History

2006/03/01 Initial version.


CONFIDENTIAL