Package com.github.robtimus.filesystems
Class Messages.FileSystemProviderMessages
- java.lang.Object
-
- com.github.robtimus.filesystems.Messages.FileSystemProviderMessages
-
-
Method Summary
-
-
-
Method Detail
-
env
public Messages.FileSystemProviderEnvMessages env()
Returns an object for providing translated messages and exceptions for file system provider properties.- Returns:
- An object for providing translated messages and exceptions for file system provider properties.
-
isDirectory
public FileSystemException isDirectory(String dir)
Creates an exception that can be thrown ifFileSystemProvider.newByteChannel(Path, Set, FileAttribute...)
or a similar method is called with a directory.- Parameters:
dir
- The directory path.- Returns:
- The created exception.
-
illegalOpenOptionCombination
public IllegalArgumentException illegalOpenOptionCombination(OpenOption... options)
Creates an exception that can be thrown ifFileSystemProvider.newByteChannel(Path, Set, FileAttribute...)
or a similar method is called with an illegal combination of open options.- Parameters:
options
- The illegal combination of open options.- Returns:
- The created exception.
-
illegalOpenOptionCombination
public IllegalArgumentException illegalOpenOptionCombination(Collection<? extends OpenOption> options)
Creates an exception that can be thrown ifFileSystemProvider.newByteChannel(Path, Set, FileAttribute...)
or a similar method is called with an illegal combination of open options.- Parameters:
options
- The illegal combination of options.- Returns:
- The created exception.
-
illegalCopyOptionCombination
public IllegalArgumentException illegalCopyOptionCombination(CopyOption... options)
Creates an exception that can be thrown ifFileSystemProvider.copy(Path, Path, CopyOption...)
orFileSystemProvider.move(Path, Path, CopyOption...)
is called with an illegal combination of copy options.- Parameters:
options
- The illegal combination of copy options.- Returns:
- The created exception.
-
illegalCopyOptionCombination
public IllegalArgumentException illegalCopyOptionCombination(Collection<? extends CopyOption> options)
Creates an exception that can be thrown ifFileSystemProvider.copy(Path, Path, CopyOption...)
orFileSystemProvider.move(Path, Path, CopyOption...)
is called with an illegal combination of copy options.- Parameters:
options
- The illegal combination of copy options.- Returns:
- The created exception.
-
unsupportedFileAttributesType
public UnsupportedOperationException unsupportedFileAttributesType(Class<? extends BasicFileAttributes> type)
Creates an exception that can be thrown ifFileSystemProvider.readAttributes(Path, Class, LinkOption...)
is called with an unsupported file attributes type.- Parameters:
type
- The unsupported type.- Returns:
- The created exception.
-
unsupportedFileAttributeView
public UnsupportedOperationException unsupportedFileAttributeView(String view)
Creates an exception that can be thrown ifFileSystemProvider.readAttributes(Path, String, LinkOption...)
orFileSystemProvider.setAttribute(Path, String, Object, LinkOption...)
is called with an unsupported file attribute view.- Parameters:
view
- The unsupported view.- Returns:
- The created exception.
-
unsupportedCreateFileAttribute
public UnsupportedOperationException unsupportedCreateFileAttribute(String attribute)
Creates an exception that can be thrown ifFileSystemProvider.newByteChannel(Path, Set, FileAttribute...)
,FileSystemProvider.createDirectory(Path, FileAttribute...)
or a similar method is called with an unsupported file attribute.- Parameters:
attribute
- The unsupported attribute.- Returns:
- The created exception.
-
unsupportedCreateFileAttributeValue
public UnsupportedOperationException unsupportedCreateFileAttributeValue(String attribute, Object value)
Creates an exception that can be thrown ifFileSystemProvider.newByteChannel(Path, Set, FileAttribute...)
,FileSystemProvider.createDirectory(Path, FileAttribute...)
or a similar method is called with an unsupported value for a supported file attribute.- Parameters:
attribute
- The attribute.value
- The unsupported value.- Returns:
- The created exception.
- Since:
- 2.2
-
unsupportedFileAttribute
public IllegalArgumentException unsupportedFileAttribute(String attribute)
Creates an exception that can be thrown ifFileSystemProvider.readAttributes(Path, String, LinkOption...)
orFileSystemProvider.setAttribute(Path, String, Object, LinkOption...)
is called with an unsupported file attribute.- Parameters:
attribute
- The unsupported attribute.- Returns:
- The created exception.
-
unsupportedOpenOption
public UnsupportedOperationException unsupportedOpenOption(OpenOption option)
Creates an exception that can be thrown ifFileSystemProvider.newByteChannel(Path, Set, FileAttribute...)
or a similar method is called with an unsupported open option.- Parameters:
option
- The unsupported open option.- Returns:
- The created exception.
-
unsupportedCopyOption
public UnsupportedOperationException unsupportedCopyOption(CopyOption option)
Creates an exception that can be thrown ifFileSystemProvider.copy(Path, Path, CopyOption...)
orFileSystemProvider.move(Path, Path, CopyOption...)
is called with an unsupported copy option.- Parameters:
option
- The unsupported copy option.- Returns:
- The created exception.
-
-