xarray.backends.FileManager

xarray.backends.FileManager#

class xarray.backends.FileManager[source]#

Manager for acquiring and closing a file object.

Use FileManager subclasses (CachingFileManager in particular) on backend storage classes to automatically handle issues related to keeping track of many open files and transferring them between multiple processes.

__init__()#

Methods

__init__()

acquire([needs_lock])

Acquire the file object from this manager.

acquire_context([needs_lock])

Context manager for acquiring a file.

close([needs_lock])

Close the file object associated with this manager, if needed.