Sets the logical end of the file.
#include <nks/fsio.h> int NXFileSetLength ( NXPathCtx_t pathCtx, const void *pathname, NXOffset_t length, unsigned long flags);
(IN) Specifies the file system path context. Along with the pathname parameter, it specifies the file whose length is being set.
(IN) Points to a null-terminated Unicode or ASCII string that specifies the name of the file (relative to pathCtx).
(IN) Specifies the new file length.
(IN) Not currently used. Set to 0.
If successful, returns 0. Otherwise, returns one of the following error codes:
NXFileSetLength sets the length of the file specified by the combination of pathCtx and pathname. If you know the handle by which the file was previously opened, you can call NXFileSetLengthWithHandle to set the file's length.
The actual physical size of the file can be smaller, larger, or the same as the length parameter.