fs.errors¶
Exception classes thrown by filesystem operations.
Errors relating to the underlying filesystem are translated in to one of the following exceptions.
All Exception classes are derived from FSError
which may be used as a catch-all filesystem exception.
- exception fs.errors.BulkCopyFailed(errors)[source]¶
Bases:
FSError
A copy operation failed in worker threads.
- exception fs.errors.CreateFailed(msg: Text | None = None, exc: Exception | None = None)[source]¶
Bases:
FSError
Filesystem could not be created.
- exception fs.errors.DestinationExists(path: Text, exc: Exception | None = None, msg: Text | None = None)[source]¶
Bases:
ResourceError
Target destination already exists.
- exception fs.errors.DirectoryExists(path: Text, exc: Exception | None = None, msg: Text | None = None)[source]¶
Bases:
ResourceError
Directory already exists.
- exception fs.errors.DirectoryExpected(path: Text, exc: Exception | None = None, msg: Text | None = None)[source]¶
Bases:
ResourceInvalid
Operation only works on directories.
- exception fs.errors.DirectoryNotEmpty(path: Text, exc: Exception | None = None, msg: Text | None = None)[source]¶
Bases:
ResourceError
Attempt to remove a non-empty directory.
- exception fs.errors.FSError(msg: Text | None = None)[source]¶
Bases:
Exception
Base exception for the
fs
module.
- exception fs.errors.FileExists(path: Text, exc: Exception | None = None, msg: Text | None = None)[source]¶
Bases:
ResourceError
File already exists.
- exception fs.errors.FileExpected(path: Text, exc: Exception | None = None, msg: Text | None = None)[source]¶
Bases:
ResourceInvalid
Operation only works on files.
- exception fs.errors.FilesystemClosed(msg: Text | None = None)[source]¶
Bases:
FSError
Attempt to use a closed filesystem.
- exception fs.errors.IllegalBackReference(path: Text)[source]¶
Bases:
ValueError
Too many backrefs exist in a path.
This error will occur if the back references in a path would be outside of the root. For example,
"/foo/../../"
, contains two back references which would reference a directory above the root.Note
This exception is a subclass of
ValueError
as it is not strictly speaking an issue with a filesystem or resource.
- exception fs.errors.InsufficientStorage(path: Text | None = None, exc: Exception | None = None, msg: Text | None = None)[source]¶
Bases:
OperationFailed
Storage is insufficient for requested operation.
- exception fs.errors.InvalidCharsInPath(path: Text, msg: Text | None = None, exc: Exception | None = None)[source]¶
Bases:
InvalidPath
Path contains characters that are invalid on this filesystem.
- exception fs.errors.InvalidPath(path: Text, msg: Text | None = None, exc: Exception | None = None)[source]¶
Bases:
PathError
Path can’t be mapped on to the underlaying filesystem.
- exception fs.errors.MissingInfoNamespace(namespace: Text)[source]¶
Bases:
AttributeError
An expected namespace is missing.
- exception fs.errors.NoSysPath(path: Text, msg: Text | None = None, exc: Exception | None = None)[source]¶
Bases:
PathError
The filesystem does not provide sys paths to the resource.
- exception fs.errors.NoURL(path: Text, purpose: Text, msg: Text | None = None)[source]¶
Bases:
PathError
The filesystem does not provide an URL for the resource.
- exception fs.errors.OperationFailed(path: Text | None = None, exc: Exception | None = None, msg: Text | None = None)[source]¶
Bases:
FSError
A specific operation failed.
- exception fs.errors.OperationTimeout(path: Text | None = None, exc: Exception | None = None, msg: Text | None = None)[source]¶
Bases:
OperationFailed
Filesystem took too long.
- exception fs.errors.PathError(path: Text, msg: Text | None = None, exc: Exception | None = None)[source]¶
Bases:
FSError
Base exception for errors to do with a path string.
- exception fs.errors.PermissionDenied(path: Text | None = None, exc: Exception | None = None, msg: Text | None = None)[source]¶
Bases:
OperationFailed
Not enough permissions.
- exception fs.errors.RemoteConnectionError(path: Text | None = None, exc: Exception | None = None, msg: Text | None = None)[source]¶
Bases:
OperationFailed
Operations encountered remote connection trouble.
- exception fs.errors.RemoveRootError(path: Text | None = None, exc: Exception | None = None, msg: Text | None = None)[source]¶
Bases:
OperationFailed
Attempt to remove the root directory.
- exception fs.errors.ResourceError(path: Text, exc: Exception | None = None, msg: Text | None = None)[source]¶
Bases:
FSError
Base exception class for error associated with a specific resource.
- exception fs.errors.ResourceInvalid(path: Text, exc: Exception | None = None, msg: Text | None = None)[source]¶
Bases:
ResourceError
Resource has the wrong type.
- exception fs.errors.ResourceLocked(path: Text, exc: Exception | None = None, msg: Text | None = None)[source]¶
Bases:
ResourceError
Attempt to use a locked resource.
- exception fs.errors.ResourceNotFound(path: Text, exc: Exception | None = None, msg: Text | None = None)[source]¶
Bases:
ResourceError
Required resource not found.
- exception fs.errors.ResourceReadOnly(path: Text, exc: Exception | None = None, msg: Text | None = None)[source]¶
Bases:
ResourceError
Attempting to modify a read-only resource.
- exception fs.errors.Unsupported(path: Text | None = None, exc: Exception | None = None, msg: Text | None = None)[source]¶
Bases:
OperationFailed
Operation not supported by the filesystem.