Sets the file size.
#include <dfs.h>
int dfs_setlength (
int fildes,
size64_t newSize,
int setSizeFlags );
(IN) Specifies the handle returned from dfs_sopen or dfs_creat for the file on which to set the size.
(IN) Specifies the logical byte offset at which the new end of the file is to be set
(IN) Specifies a bit mask, indicating the ways in which the file can be expanded
If successful, returns 0. Otherwise, returns a nonzero error code:
For possible DFS errors, see Section 13.4.5, DFS Return Values.
The dfs_setlength function modifies the data size (end of file) for the open file identified by fildes. If the file has more than one data stream, only the size of the data stream identified by fildes is modified. To modify the size of more than one data stream, an application must open each stream independently and call dfs_setlength once for each data stream.
The dfs_setlength function works with the Novell Storage Services file system only. If fildes specifies a file for any other system, dfs_setlength does not operate.
If the new size is smaller than the original size, the data at the end of the original data stream is truncated. If the new size is larger than the original size, the data size is expanded.