Class PathIOException

All Implemented Interfaces:
Serializable
Direct Known Subclasses:
ClosedIOException, PathAccessDeniedException, PathExistsException, PathNotFoundException, PathPermissionException

public class PathIOException extends IOException
Exceptions based on standard posix/linux style exceptions for path related errors. Returns an exception with the format "path: standard error string". This exception corresponds to Error Input/ouput(EIO)
See Also:
  • Constructor Details

    • PathIOException

      public PathIOException(String path)
      Constructor a generic I/O error exception
      Parameters:
      path - for the exception
    • PathIOException

      public PathIOException(String path, Throwable cause)
      Appends the text of a Throwable to the default error message
      Parameters:
      path - for the exception
      cause - a throwable to extract the error message
    • PathIOException

      public PathIOException(String path, String error)
      Avoid using this method. Use a subclass of PathIOException if possible.
      Parameters:
      path - for the exception
      error - custom string to use an the error text
    • PathIOException

      public PathIOException(String path, String error, Throwable cause)
      Use a subclass of PathIOException if possible.
      Parameters:
      path - for the exception
      error - custom string to use an the error text
      cause - cause of exception.
  • Method Details

    • withFullyQualifiedPath

      public PathIOException withFullyQualifiedPath(String fqPath)
    • getMessage

      public String getMessage()
      Format: cmd: {operation} `path' {to `target'}: error string
      Overrides:
      getMessage in class Throwable
    • getPath

      public Path getPath()
      Returns:
      Path that generated the exception
    • getTargetPath

      public Path getTargetPath()
      Returns:
      Path if the operation involved copying or moving, else null
    • setOperation

      public void setOperation(String operation)
      Optional operation that will preface the path
      Parameters:
      operation - a string
    • setTargetPath

      public void setTargetPath(String targetPath)
      Optional path if the exception involved two paths, ex. a copy operation
      Parameters:
      targetPath - the of the operation