FS_OpenFile


C Specification

#include <nitro/fs.h>

BOOL FS_OpenFile( FSFile *p_file, const char *path );

Description

This function opens a file using a specified path name.

You can specify the path name using the following formats.

Only ASCII code can be used in the path name. Additionally, the following are prohibited: \ / : ; * ? " < > |

The number of characters in the file name and directory name must not exceed FS_FILE_NAME_MAX.

The following directory names are reserved.

. This indicates the current directory (is ignored).
.. This indicates the directory that is one level above.

Caution

In the application, the NITRO_MAKEROM flag must be enabled so that the ROM file system is included.

This function cannot be called from the interrupt handler (IRQ mode). Note that the process may not be completed if interrupts are prohibited.

Arguments

p_file The FSFile structure's address
path File's path name

Return Values

If the file is correctly opened it returns TRUE. Otherwise it returns FALSE.

See Also

FSFile, FS_OpenFileFast, FS_CloseFile, FS_GetLength, FS_ReadFile, FS_SeekFile, FS_SeekFileToBegin, FS_SeekFileToEnd

Revision History

09/24/2004 Added the description in the Caution section regarding the conditions for calling this function.
04/02/2004 Revised description due to elimination of path length restriction
04/01/2004 Initial version