VFCreateSystemFile*

C Specification


#include <revolution/vf.h>

typedef s32	VFDevErr;

VFDevErr VFCreateSystemFileNANDFlash( const char* sysFileName, u32 fileSize );
VFDevErr VFCreateSystemFileRam( void* memory, u32 fileSize );

Arguments

sysFileName The file path for the vff file being created. The file name must use 8.3 format.
memory The RAM address for the vff file being created.
fileSize The size of the .vff file being created (specify a size larger than 20KBytes that is a multiple of 32).

Return Values

If VFCreateSystemFileNANDFlash was used:
One of the NANDCreate values  (NAND_RESULT_*) is returned.
NAND_RESULT_OK is returned if the function ends normally.
For details, see NANDCreate in the NAND Library manual.

If VFCreateSystemFileRam was used:
Always returns 0 (normal termination).

Description

Run NANDCheck in the application when creating files in NAND memory.

Creates a .vff file (Virtual File system file) on each device.

If a non-existent directory is found within the path, the target directory is not created and an error is returned here.

At present, when a .vff file is created with VFCreateSystemFileNANDFlash, the file is created such that only its owner has read/write permissions.
When a created .vff file is used for the first time after calling VFMountDriveXXX(), be sure to format with VFFormatDrive( ).

Delete the .vff file inside VF if this function fails while creating the system file.
However, since VF_ERR_VFF_FILE_FORMAT is returned during mounting if file deletion failed, delete the file, and then create another .vff file.

See Also

VFMountDrive, VFFormatDrive

Revision History

2006/10/11
2007/05/08 Revised the description of Arguments and added descriptions for Return Values.


CONFIDENTIAL