VFWriteFile

C Specification


#include <revolution/vf.h>

typedef void	VFFile;
typedef s32	VFErr;

VFErr VFWriteFile( VFFile* file, void* buf, u32 size );

Arguments

file A pointer to the file descriptor.
buf A pointer to the storage region for writing data.
size The number of bytes of data to write.

Return Values

Returns 0 when successful
Otherwise, returns VFErr other than 0

Description

Writes data to an open file. Returns an error (VF_ERR_ENOSPC) when there is no more space available to write.

Note: Operations cannot be guaranteed if you have specified access to an invalid region because an address check for buf (the pointer to the buffer) is not performed if the pointer is not a NULL pointer.
A write will not take place if the data size is 4 GB or greater. In that case, only the first 4 GB of data will be written.

See Also

VFCreateFile, VFOpenFile, VFSeekFile, VFReadFile, VFCloseFile, VFDeleteFile

Revision History

2006/04/26
2007/05/08 Corrected errors.


CONFIDENTIAL