Top Description Fields Constructors Methods
org.apache.sshd.sftp.client.fs

public Class SftpPath

extends BasePath<SftpPath, SftpFileSystem>
implements WithFileAttributes
Class Inheritance
All Implemented Interfaces
org.apache.sshd.sftp.client.fs.WithFileAttributes
Known Direct Subclasses
org.apache.sshd.sftp.client.impl.SftpPathImpl
Imports
java.io.IOException, java.nio.file.FileSystem, .LinkOption, java.nio.file.spi.FileSystemProvider, java.util.List, org.apache.sshd.common.file.util.BasePath, org.apache.sshd.sftp.client.SftpClient

A java.nio.file.Path on an SftpFileSystem.

Field Summary

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

Constructor Summary

AccessConstructor and Description
public
SftpPath(SftpFileSystem fileSystem, String root, List<String> names)

Method Summary

Modifier and TypeMethod and Description
public SftpClient.Attributes
getAttributes()

Implements org.apache.sshd.sftp.client.fs.WithFileAttributes.getAttributes.

Retrieves the Attributes of this object, if it has any.

public SftpPath
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:
asStringasTcalculatedHashCodecheckPathcomparecompareTocreatecreatecreateendsWithendsWithendsWithequalsgetFileNamegetFileSystemgetNamegetNameCountgetParentgetRoothashCodeisAbsoluteisNormaliteratornormalizeregisterregisterrelativizeresolveresolveresolveSiblingresolveSiblingstartsWithstartsWithstartsWithsubpathtoAbsolutePathtoFiletoStringtoUri

Constructor Detail

SftpPathback to summary
public SftpPath(SftpFileSystem fileSystem, String root, List<String> names)

Method Detail

getAttributesback to summary
public SftpClient.Attributes getAttributes()

Implements org.apache.sshd.sftp.client.fs.WithFileAttributes.getAttributes.

Doc from org.apache.sshd.sftp.client.fs.WithFileAttributes.getAttributes.

Retrieves the Attributes of this object, if it has any.

Returns:SftpClient.Attributes

the Attributes or null if there are none

Annotations
@Override
toRealPathback to summary
public SftpPath 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:SftpPath

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