FS_SetFileLength

Syntax


#include <nitro/fs.h>

FSResult	FS_SetFileLength(FSFile *file, u32 length);

Arguments

file The FSFile structure that holds the file handle.
Read and write access rights are required.
length File size to set.

Return Values

The result that it returns is of type FSResult.

Description

Sets the size of the file.
When extending the size, the values in the extended region will be indeterminate. When reducing the size, the seek positions that are no longer within the region will be adjusted back to the new ending position.

Notes

This operation requires a return to the original seek position after the end-of-file position has been changed, so both read and write access rights are required.

See Also

FS_OpenFileEx
FS_GetFileLength

Revision History

2008/12/08 Noted that read and write access rights are required.
2007/09/18 Initial version.


CONFIDENTIAL