DVDOpen

C Specification

#include <revolution/dvd.h>
BOOL DVDOpen(const char* fileName, DVDFileInfo* fileInfo);

Arguments

fileName Pointer to file name to open.
fileInfo Pointer to file info to use.

Return Values

Returns TRUE if file exists and FALSE if file doesn't exist.

Description

Opens a file.

The DVDOpen function returns FALSE if the specified file isn't found. If you want to check for a file and then conditionally branch (i.e., read and use the file if it exists or use default values), use the DVDConvertPathToEntrynum function. Because the DVDOpen function outputs a warning message if the file isn't found.

The DVDOpen function is the same as the DVDConvertPathToEntrynum and DVDFastOpen functions combined.

fileName accepts one of the following formats:

- /texture/mario
- texture/mario

The device driver accepts the first format as an absolute pathname; in contrast, the device driver accepts the second format as the relative pathname from the current directory (see the DVDChangeDir function). There are no restrictions for the file name length.

You need to use "/" (forward slash). You can't use "\" (backward slash).

Similar to other file systems, you can use ".." and "." to represent the parent directory and the current directory, respectively. The parent directory of the root directory is considered the root directory.

See Also

DVDInit
DVDClose
DVDFastOpen
DVDConvertPathToEntrynum

Revision History

2006/03/01 Initial version.


CONFIDENTIAL