dfvfs.resolver package
Submodules
dfvfs.resolver.context module
The resolver context object.
- class dfvfs.resolver.context.Context[source]
Bases:
object
Resolver context.
- CacheFileObject(path_spec, file_object)[source]
Caches a file-like object based on a path specification.
- CacheFileSystem(path_spec, file_system)[source]
Caches a file system object based on a path specification.
- Parameters
path_spec (PathSpec) – path specification.
file_system (FileSystem) – file system object.
- Raises
KeyError – if the file system already is cached.
- DeregisterMountPoint(mount_point)[source]
Deregisters a path specification mount point.
- Parameters
mount_point (str) – mount point identifier.
- Raises
KeyError – if the corresponding mount point is not set.
- GetFileSystem(path_spec)[source]
Retrieves a file system object defined by path specification.
- Parameters
path_spec (PathSpec) – path specification.
- Returns
a file system object or None if not cached.
- Return type
dfvfs.resolver.resolver module
The path specification resolver.
- class dfvfs.resolver.resolver.Resolver[source]
Bases:
object
Path specification resolver.
- classmethod OpenFileEntry(path_spec_object, resolver_context=None)[source]
Opens a file entry object defined by path specification.
- classmethod OpenFileObject(path_spec_object, resolver_context=None)[source]
Opens a file-like object defined by path specification.
- Parameters
- Returns
- file-like object or None if the path specification could not
be resolved.
- Return type
- Raises
BackEndError – if the file object cannot be opened.
MountPointError – if the mount point specified in the path specification does not exist.
PathSpecError – if the path specification is incorrect.
TypeError – if the path specification type is unsupported.
- classmethod OpenFileSystem(path_spec_object, resolver_context=None)[source]
Opens a file system object defined by path specification.
- Parameters
- Returns
- file system or None if the path specification could not
be resolved or has no file system object.
- Return type
- Raises
AccessError – if the access to open the file system was denied.
BackEndError – if the file system cannot be opened.
MountPointError – if the mount point specified in the path specification does not exist.
PathSpecError – if the path specification is incorrect.
TypeError – if the path specification type is unsupported.
- key_chain = <dfvfs.credentials.keychain.KeyChain object>