CBFS Filter 2020 Python Edition

Questions / Feedback?

set_file_size_direct Method

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

Syntax

def set_file_size_direct(file_handle: int, size: int) -> bool: ...

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 create_file_direct 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 Python Edition - Version 20.0 [Build 8317]