gfal#
GFAL file interface for remote target access.
Class GFALFileInterface
#
- class GFALFileInterface(atomic_contexts=False, gfal_options=None, transfer_config=None, **kwargs)#
Bases:
RemoteFileInterface
- exists(path, stat=False, base=None, **kwargs)#
Returns True when the path exists and False otherwise. When stat is True, returns the stat object or None.
- stat(path, base=None, **kwargs)#
Returns a stat object or raises an exception when path does not exist.
- isdir(path, stat=None, base=None, **kwargs)#
Returns True when path refers to an existing directory, optionally using a precomputed stat object instead, and False otherwise.
- isfile(path, stat=None, base=None, **kwargs)#
Returns True when path refers to a existing file, optionally using a precomputed stat object instead, and False otherwise.
- chmod(path, perm, base=None, silent=False, **kwargs)#
Changes the permission of a path to perm. Raises an exception when path does not exist or returns False when silent is True, and returns True on success.
- unlink(path, base=None, silent=True, **kwargs)#
Removes a file at path. Raises an exception when path does not exist or returns False when silent is True, and returns True on success.
- rmdir(path, base=None, silent=True, **kwargs)#
Removes a directory at path. Raises an exception when path does not exist or returns False when silent is True, and returns True on success.
- remove(path, base=None, silent=True, **kwargs)#
Recursive removal is potentially expensive in terms of remote file operations, so this method is designed to reduce them as much as possible.
- mkdir(path, perm, base=None, silent=True, **kwargs)#
Creates a directory at path with permissions perm. Raises an exception when path already exists or returns False when silent is True, and returns True on success.
- mkdir_rec(path, perm, base=None, silent=True, **kwargs)#
Recursively creates a directory and intermediate missing directories at path with permissions perm. Raises an exception when path already exists or returns False when silent is True, and returns True on success.
- listdir(path, base=None, **kwargs)#
Returns a list of elements in and relative to path.
- filecopy(src, dst, base=None, **kwargs)#
Copies a file from src to dst. Returns the full, schemed src and dst URIs used for copying in a 2-tuple.