FileChannel.TruncateAsync(Int64) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Runs the synchronous file truncate operation in a task.
public System.Threading.Tasks.Task<Java.Nio.Channels.FileChannel?> TruncateAsync(long size);
member this.TruncateAsync : int64 -> System.Threading.Tasks.Task<Java.Nio.Channels.FileChannel>
Parameters
- size
- Int64
The non-negative size in bytes. A smaller value discards bytes beyond that size; a value at least as large as the current size does not grow the file. A file position greater than this value is reduced to it.
Returns
A task whose result is this file channel.
Remarks
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.