CBFS Connect 2020 Python Edition

Questions / Feedback?

release_unused_files Method

Instructs the OS to release any files kept open by the cache manager.

Syntax

def release_unused_files() -> bool: ...

Remarks

This method instructs the OS to release any files that the system cache manager has kept open, and returns either True or False to indicate whether the files were released successfully. Having the OS release open files can be useful in situations where operations need to be performed while the filesystem is not in use.

Please note that the OS may open additional files during the execution of this method. To guard against this, it is recommended that application use a critical section (or other synchronization object) when calling this method, and use the same one in the on_open_file event handler. Such an approach ensures that the cache manager has no files open after calling this method.

Note: This method can only be called when active is True. It may be called both within and outside of events; when called within an event, it is executed asynchronously on another thread (causing the call to return immediately, and an ERROR_IO_PENDING result code to be reported to the OS).

 
 
Copyright (c) 2021 Callback Technologies, Inc. - All rights reserved.
CBFS Connect 2020 Python Edition - Version 20.0 [Build 7880]