Contents

truncate

Indicates that opening the file truncates the file if it exists.

Declaration

static var truncate: FileDescriptor.OpenOptions { get }

Mentioned in

Discussion

If this option is specified and the file exists, the file is truncated to zero bytes before any other operations are performed.

The corresponding C constant is O_TRUNC.

See Also

Specifying Options