Wiki source for sqFTruncate

Show raw source

======**int sqFTruncate(filenum, fileoffset)**======

filenum file number
fileoffset file byte offset to truncate to.
**return**: 0 if ok. non-zero to fail the primitive call.

**From**: Interpreter, file plugin
To truncate the file, this removes bytes from the end, or extends the file depending on the meaning of truncate in the file system.


/* Macro to provide default null behaviour for ftruncate - a non-ansi call
used in FilePlugin.
Override in sqPlatformSpecific.h for each platform that implements a
file truncate, or consider replacing the
file with a platform specific version as Win32 and RISC OS do.
By default it is defined as
#define sqFTruncate(filenum, fileoffset) true

#define sqFTruncate(f,o) ftruncate(fileno(f), o)

See iPhone

#define sqFTruncate(f,o) ftruncate(fileno(f), o)

#define sqFTruncate(f,o) ftruncate(fileno(f), o)

??? It's unclear I think it inherits the #define sqFTruncate(filenum, fileoffset) true

Does Windows support sqFTruncate???

Valid XHTML :: Valid CSS: :: Powered by WikkaWiki