SetFileSizeDirect Method

Resizes a file by passing the request directly to the filesystem.

Syntax

public boolean setFileSizeDirect(long fileHandle, long size);

Remarks

Applications can call this method in filesystem-related event handlers to resize a file without sending the request through the filesystem filter driver stack. If the file is resized successfully, this method returns true; otherwise, it returns false.

The FileHandle parameter specifies the file that should be resized. The value passed for this parameter must be a file handle obtained from the CreateFileDirect method; please refer to its documentation for more information.

The Size parameter specifies the new file size, in bytes.

Note: This method can only be called within events.

Copyright (c) 2022 Callback Technologies, Inc. - All rights reserved.
CBFS Filter 2020 Java Edition - Version 20.0 [Build 8317]