#include <revolution/dvd.h> s32 DVDConvertPathToEntrynum(const char* fileName);
| fileName | Pointer to a file name to convert. |
|---|
Returns the entry number if the file is found, -1 if the file is not found.
Converts a file name to an entry number. The entry number is a unique number assigned to a file. After an entry number is obtained for a file, call the DVDFastOpen function. The DVDFastOpen function opens the file quicker than DVDOpen.
This function is also used to check whether a file exists. 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 is undesirable, because the DVDOpen function displays a warning message if the specified file does not exist. Even if fileName does not exist, the DVDConvertPathToEntrynum function will not display a message.
Because the DVDConvertPathToEntrynum function returns a unique entry number, the number can be used for the user's own purposes, for example, as a file ID for managing a file cache system. Note that this number changes with the next ndrun, especially after you add, delete or move files, or change disc layout.
2006/03/01 Initial version.
CONFIDENTIAL