truncate


Purpose

Changes the length of the file to that specified. If shortening the file, the data beyond the new length is discarded. If extending the file, the existing data is zero-padded up to the new length.

Signature

FileWriter.truncate(size)

Returns

This method does not return anything.

Parameter

Name Description Type Use
size The size to which the length of the file is to be adjusted, measured in bytes. int optional

Related topics

FileWriter
Overview
Legal notice | Copyright © 2016 and Confidential to Pegasystems Inc. All rights reserved
PDN | Hybrid Container | Feedback
Advanced...