| Command group | Flag affected | Reversible | Execute on client | Platform(s) |
|---|---|---|---|---|
| External commands | YES | NO | NO | Windows,Linux |
Truncate file (refnum [,end-position] [,end-position-is-character]) Returns err-code
Note: The flag is set according to whether Omnis was able to make a call to this external command.
This command truncates a file. You specify the file reference number returned by Open file in refnum. The file is truncated at the current position of the file pointer or the specified end-position if given. The end-position parameter represents a byte position, unless you pass end-position-is-character as a non-zero value, in which case it represents an operating system character position (a byte position when running on Linux, or a 16-bit character position when running on Win32 or macOS).
It returns an error code (See Error Codes), or zero if no error occurs.