Top Fields Constructors Methods
org.apache.sshd.common.file.root

public Class RootedPath

extends BasePath<RootedPath, RootedFileSystem>
Class Inheritance
Imports
java.io.File, .IOException, java.nio.file.FileSystem, .LinkOption, .Path, java.nio.file.spi.FileSystemProvider, java.util.List, org.apache.sshd.common.file.util.BasePath

Author
Apache MINA SSHD Project

Field Summary

Inherited from org.apache.sshd.common.file.util.BasePath:
namesroot

Constructor Summary

AccessConstructor and Description
public
RootedPath(RootedFileSystem fileSystem, String root, List<String> names)

Method Summary

Modifier and TypeMethod and Description
public File
toFile()

Overrides org.apache.sshd.common.file.util.BasePath.toFile.

Overrides default java.nio.file.Path.toFile.

Returns a File object representing this path.

public RootedPath
toRealPath(LinkOption...
options indicating how symbolic links are handled
options
)

Implements java.nio.file.Path.toRealPath.

Returns the real path of an existing file.

Inherited from org.apache.sshd.common.file.util.BasePath:
asStringasTcalculatedHashCodecheckPathcomparecompareTocreatecreatecreateendsWithendsWithendsWithequalsgetFileNamegetFileSystemgetNamegetNameCountgetParentgetRoothashCodeisAbsoluteisNormaliteratornormalizeregisterregisterrelativizeresolveresolveresolveSiblingresolveSiblingstartsWithstartsWithstartsWithsubpathtoAbsolutePathtoStringtoUri

Constructor Detail

RootedPathback to summary
public RootedPath(RootedFileSystem fileSystem, String root, List<String> names)

Method Detail

toFileback to summary
public File toFile()

Overrides org.apache.sshd.common.file.util.BasePath.toFile.

Overrides default java.nio.file.Path.toFile.

Doc from java.nio.file.Path.toFile.

Returns a File object representing this path. Where this Path is associated with the default provider, then this method is equivalent to returning a File object constructed with the String representation of this path.

If this path was created by invoking the File toPath method then there is no guarantee that the File object returned by this method is equal to the original File.

Returns:File

a File object representing this path

Annotations
@Override
toRealPathback to summary
public RootedPath toRealPath(LinkOption... options) throws IOException

Implements java.nio.file.Path.toRealPath.

Doc from java.nio.file.Path.toRealPath.

Returns the real path of an existing file.

The precise definition of this method is implementation dependent but in general it derives from this path, an absolute path that locates the same file as this path, but with name elements that represent the actual name of the directories and the file. For example, where filename comparisons on a file system are case insensitive then the name elements represent the names in their actual case. Additionally, the resulting path has redundant name elements removed.

If this path is relative then its absolute path is first obtained, as if by invoking the toAbsolutePath method.

The options array may be used to indicate how symbolic links are handled. By default, symbolic links are resolved to their final target. If the option NOFOLLOW_LINKS is present then this method does not resolve symbolic links. Some implementations allow special names such as ".." to refer to the parent directory. When deriving the real path, and a ".." (or equivalent) is preceded by a non-".." name then an implementation will typically cause both names to be removed. When not resolving symbolic links and the preceding name is a symbolic link then the names are only removed if it is guaranteed that the resulting path will locate the same file as this path.

Parameters
options:LinkOption[]

options indicating how symbolic links are handled

Returns:RootedPath

an absolute path represent the real path of the file located by this object

Annotations
@Override
Exceptions
IOException:
if the file does not exist or an I/O error occurs