VFCreateFile(W)

C Specification


#include <revolution/vf.h>

typedef void	VFFile;

VFFile* VFCreateFile( const char* path, u32 attr );
VFFile* VFCreateFileW( const VFWchar* path, u32 attr );

Arguments

path The address storing the path and file name.
Either a full or relative path may be specified.
attr Specifies the file attributes. (not currently used)
To assure future compatibility, always specify 0.

Return Values

Pointer for the file descriptor.
NULL is returned if the function fails.

You can get details about the error using VFGetLastError.

Description

Creates a file (in read/write mode).

The maximum length of a file name that can be specified is 256 characters (512 bytes), including the NULL character.
In addition, the maximum length of the path name is 260 characters (520 bytes), including the NULL character.
If a path is not specified in the file name, the file is created in the current directory.
Paths can be specified as either relative or absolute.

File names will preserve differences in letter case (capitals vs. lowercase), but searching will not differentiate by case.

See Also

VFOpenFile, VFSeekFile, VFReadFile, VFWriteFile, VFCloseFile, VFDeleteFile

Revision History

2006/06/23
2007/05/08 Added description of Return Values.


CONFIDENTIAL