| Modifier and Type | Field and Description |
|---|---|
| public static final SftpFileSystemAccessor | |
| public static final boolean | DEFAULT_AUTO_SYNC_FILE_ON_CLOSE
Default value for sftp-auto-fsync-on-close if none set |
| public static final List | |
| public static final NavigableMap | FILEATTRS_RESOLVERS
A case insensitive |
| public static final String | PROP_AUTO_SYNC_FILE_ON_CLOSE
Whether to invoke |
| Modifier and Type | Method and Description |
|---|---|
| public default void | applyExtensionFileAttributes(SftpSubsystemProxy
The SFTP subsystem instance that manages the session subsystem, Path The referenced file file, Map<String, byte[]> The received extensions - may be extensions, LinkOption... null/emptyThe options)LinkOption-s that were used to access the file's standard attributesInvoked in order to allow processing of custom file attributes |
| public default void | closeDirectory(SftpSubsystemProxy
The SFTP subsystem instance that manages the session subsystem, DirectoryHandle The dirHandle, Path DirectoryHandle representing the stream - may be null if not invoked
within the context of such a handle (special cases)The requested local directory dir, String Path - same one returned by
resolveLocalFilePathThe assigned directory handle through which the remote peer references this directory handle, DirectoryStream<Path> The disposed ds)DirectoryStreamCalled when a directory stream is no longer required |
| public default void | closeFile(SftpSubsystemProxy
The SFTP subsystem instance that manages the session subsystem, FileHandle The fileHandle, Path FileHandle representing the created channel - may be null if not invoked
within the context of such a handle (special cases)The requested local file file, String Path - same one returned by
resolveLocalFilePathThe assigned file handle through which the remote peer references this file handle, Channel The original channel, Set<? extends OpenOption> Channel that was returned by
openFile(SftpSubsystemProxy, FileHandle, Path, String, Set, FileAttribute.The original options used to open the channel options)Called to inform the accessor that it should close the file |
| public default void | |
| public default void | |
| public default void | createLink(SftpSubsystemProxy
The SFTP subsystem instance that manages the session subsystem, Path The requested link link, Path Path - same one returned by
resolveLocalFilePathThe existing existing, boolean Path that the link should referencetrue if this should be a symbolic linkInvoked in order to create a link to a path |
| public default boolean | |
| public default DirectoryStream | Returns: The openedDirectoryStreamThe SFTP subsystem instance that manages the session subsystem, DirectoryHandle The dirHandle, Path DirectoryHandle representing the streamThe requested local directory dir, String Path - same one returned by
resolveLocalFilePathThe assigned directory handle through which the remote peer references this directory handle, LinkOption... The linkOptions)LinkOptions - OK if null/empty.Called when a new directory stream is requested |
| public default SeekableByteChannel | Returns: The openedSeekableByteChannelThe SFTP subsystem instance that manages the session subsystem, FileHandle The fileHandle, Path FileHandle representing the created channel - may be null if not invoked
within the context of such a handle (special cases)The requested local file file, String Path - same one returned by
resolveLocalFilePathThe assigned file handle through which the remote peer references this file. May be
handle, Set<? extends OpenOption> null/empty if the request is due to some internal functionality instead of due to
peer requesting a handle to a file.The requested options, FileAttribute<?>... OpenOptionsThe requested attrs)FileAttributesCalled whenever a new file is opened |
| public default void | putRemoteFileName(SftpSubsystemProxy
The SFTP subsystem instance that manages the session subsystem, Path The associated file path, Buffer Path - Note: might be a symbolic link containerThe target buf, String Buffer for the encoded stringThe string to send name, boolean If shortName)true then this is the "pure" file name/path, otherwise it also contains
user/group/size/last-modified-time/etc.Invoked in order to encode the outgoing referenced file name/path |
| public default Map | Returns: AMap of all the attributes available for the file in the viewThe SFTP subsystem instance that manages the session subsystem, Path The requested local file file, String Path - same one returned by
resolveLocalFilePathThe required view name view, LinkOption... The access options)LinkOption-sInvoked when required to retrieve file attributes for a specific file system view |
| public default void | |
| public default void | |
| public default LinkOption[] | resolveFileAccessLinkOptions(SftpSubsystemProxy
The SFTP subsystem instance that manages the session subsystem, Path The referenced file file, int The SFTP command that triggered this access cmd, String The SFTP extension that triggered this access - non-empty only for {SSH_FXP_EXTENDED} command extension, boolean Whether to follow symbolic links followLinks)Invoked in order to determine the symbolic link follow options |
| public default UserPrincipal | |
| public default GroupPrincipal | |
| public default String | |
| public default Path | Returns: The localPathThe SFTP subsystem instance that manages the session subsystem, Path The default root directory used to resolve relative paths - a.k.a. the
rootDir, String chroot locationThe remote path - separated by '/' remotePath)Invoked in order to resolve remote file paths reference by the client into ones accessible by the server |
| public default NavigableMap | Returns: The updated attributes mapThe SFTP subsystem instance that manages the session subsystem, Path The referenced file file, int A mask of the original required attributes flags, NavigableMap<String, Object> The default resolved attributes map attrs, LinkOption... The options)LinkOption-s that were used to access the file's attributesInvoked in order to allow intervention to the reported file attributes - e.g., add custom/extended properties |
| public static SecureDirectoryStream | |
| public static SecureDirectoryStream | |
| public static SeekableByteChannel | seekableByteChannelNoLinkFollow(Path src, Set<? extends OpenOption> opts, FileAttribute<?>... fileAttributes)
|
| public default void | setFileAccessControl(SftpSubsystemProxy subsystem, Path file, List<AclEntry> acl, LinkOption... options)
|
| public default void | setFileAttribute(SftpSubsystemProxy
The SFTP subsystem instance that manages the session subsystem, Path The requested local file file, String Path - same one returned by
resolveLocalFilePathThe required view name view, String The attribute name attribute, Object The attribute value value, LinkOption... The access options)LinkOption-sSets a view attribute for a local file |
| public default void | |
| public default void | setFilePermissions(SftpSubsystemProxy subsystem, Path file, Set<PosixFilePermission> perms, LinkOption... options)
|
| public default void | |
| public default void | syncFileData(SftpSubsystemProxy
The SFTP subsystem instance that manages the session subsystem, FileHandle The fileHandle, Path FileHandle representing the created channelThe requested local file file, String Path - same one returned by
resolveLocalFilePathThe assigned file handle through which the remote peer references this file handle, Channel The original channel)Channel that was returned by
openFile(SftpSubsystemProxy, FileHandle, Path, String, Set, FileAttribute.Called when file meta-data re-synchronization is required |
| public default FileLock | Returns: A lock object representing the newly-acquired lock, ornull if the lock could not be
acquired because another program holds an overlapping lockThe SFTP subsystem instance that manages the session subsystem, FileHandle The fileHandle, Path FileHandle representing the created channelThe requested local file file, String Path - same one returned by
resolveLocalFilePathThe assigned file handle through which the remote peer references this file handle, Channel The original channel, long Channel that was returned by
openFile(SftpSubsystemProxy, FileHandle, Path, String, Set, FileAttribute.The position at which the locked region is to start - must be non-negative position, long The size of the locked region; must be non-negative, and the sum
position + size must be non-negative size, boolean true to request a shared lock, false to request an exclusive lockCalled when locking a section of a file is requested |
| DEFAULT | back to summary |
|---|---|
| public static final SftpFileSystemAccessor DEFAULT | |
| DEFAULT_AUTO_SYNC_FILE_ON_CLOSE | back to summary |
|---|---|
| public static final boolean DEFAULT_AUTO_SYNC_FILE_ON_CLOSE Default value for sftp-auto-fsync-on-close if none set | |
| DEFAULT_UNIX_VIEW | back to summary |
|---|---|
| public static final List<String> DEFAULT_UNIX_VIEW | |
| FILEATTRS_RESOLVERS | back to summary |
|---|---|
| public static final NavigableMap<String, FileInfoExtractor<?>> FILEATTRS_RESOLVERS A case insensitive | |
| PROP_AUTO_SYNC_FILE_ON_CLOSE | back to summary |
|---|---|
| public static final String PROP_AUTO_SYNC_FILE_ON_CLOSE Whether to invoke | |
| applyExtensionFileAttributes | back to summary |
|---|---|
| public default void applyExtensionFileAttributes(SftpSubsystemProxy subsystem, Path file, Map<String, byte[]> extensions, LinkOption... options) throws IOException Invoked in order to allow processing of custom file attributes
| |
| closeDirectory | back to summary |
|---|---|
| public default void closeDirectory(SftpSubsystemProxy subsystem, DirectoryHandle dirHandle, Path dir, String handle, DirectoryStream<Path> ds) throws IOException Called when a directory stream is no longer required
| |
| closeFile | back to summary |
|---|---|
| public default void closeFile(SftpSubsystemProxy subsystem, FileHandle fileHandle, Path file, String handle, Channel channel, Set<? extends OpenOption> options) throws IOException Called to inform the accessor that it should close the file
| |
| copyFile | back to summary |
|---|---|
| public default void copyFile(SftpSubsystemProxy subsystem, Path src, Path dst, Collection<CopyOption> opts) throws IOException | |
| createDirectory | back to summary |
|---|---|
| public default void createDirectory(SftpSubsystemProxy subsystem, Path path) throws IOException | |
| createLink | back to summary |
|---|---|
| public default void createLink(SftpSubsystemProxy subsystem, Path link, Path existing, boolean symLink) throws IOException Invoked in order to create a link to a path
| |
| noFollow | back to summary |
|---|---|
| public default boolean noFollow(Collection<?> opts) | |
| openDirectory | back to summary |
|---|---|
| public default DirectoryStream Called when a new directory stream is requested
| |
| openFile | back to summary |
|---|---|
| public default SeekableByteChannel openFile(SftpSubsystemProxy subsystem, FileHandle fileHandle, Path file, String handle, Set<? extends OpenOption> options, FileAttribute<?>... attrs) throws IOException Called whenever a new file is opened
| |
| putRemoteFileName | back to summary |
|---|---|
| public default void putRemoteFileName(SftpSubsystemProxy subsystem, Path path, Buffer buf, String name, boolean shortName) throws IOException Invoked in order to encode the outgoing referenced file name/path
| |
| readFileAttributes | back to summary |
|---|---|
| public default Map Invoked when required to retrieve file attributes for a specific file system view
| |
| removeFile | back to summary |
|---|---|
| public default void removeFile(SftpSubsystemProxy subsystem, Path path, boolean isDirectory) throws IOException | |
| renameFile | back to summary |
|---|---|
| public default void renameFile(SftpSubsystemProxy subsystem, Path oldPath, Path newPath, Collection<CopyOption> opts) throws IOException | |
| resolveFileAccessLinkOptions | back to summary |
|---|---|
| public default LinkOption[] resolveFileAccessLinkOptions(SftpSubsystemProxy subsystem, Path file, int cmd, String extension, boolean followLinks) throws IOException Invoked in order to determine the symbolic link follow options
| |
| resolveFileOwner | back to summary |
|---|---|
| public default UserPrincipal resolveFileOwner(SftpSubsystemProxy subsystem, Path file, UserPrincipal name) throws IOException | |
| resolveGroupOwner | back to summary |
|---|---|
| public default GroupPrincipal resolveGroupOwner(SftpSubsystemProxy subsystem, Path file, GroupPrincipal name) throws IOException | |
| resolveLinkTarget | back to summary |
|---|---|
| public default String resolveLinkTarget(SftpSubsystemProxy subsystem, Path link) throws IOException | |
| resolveLocalFilePath | back to summary |
|---|---|
| public default Path resolveLocalFilePath(SftpSubsystemProxy subsystem, Path rootDir, String remotePath) throws IOException, InvalidPathException Invoked in order to resolve remote file paths reference by the client into ones accessible by the server
| |
| resolveReportedFileAttributes | back to summary |
|---|---|
| public default NavigableMap Invoked in order to allow intervention to the reported file attributes - e.g., add custom/extended properties
| |
| secure | back to summary |
|---|---|
| public static SecureDirectoryStream | |
| secureResolveDirectoryStream | back to summary |
|---|---|
| public static SecureDirectoryStream | |
| seekableByteChannelNoLinkFollow | back to summary |
|---|---|
| public static SeekableByteChannel seekableByteChannelNoLinkFollow(Path src, Set<? extends OpenOption> opts, FileAttribute<?>... fileAttributes) throws IOException | |
| setFileAccessControl | back to summary |
|---|---|
| public default void setFileAccessControl(SftpSubsystemProxy subsystem, Path file, List<AclEntry> acl, LinkOption... options) throws IOException | |
| setFileAttribute | back to summary |
|---|---|
| public default void setFileAttribute(SftpSubsystemProxy subsystem, Path file, String view, String attribute, Object value, LinkOption... options) throws IOException Sets a view attribute for a local file
| |
| setFileOwner | back to summary |
|---|---|
| public default void setFileOwner(SftpSubsystemProxy subsystem, Path file, Principal value, LinkOption... options) throws IOException | |
| setFilePermissions | back to summary |
|---|---|
| public default void setFilePermissions(SftpSubsystemProxy subsystem, Path file, Set<PosixFilePermission> perms, LinkOption... options) throws IOException | |
| setGroupOwner | back to summary |
|---|---|
| public default void setGroupOwner(SftpSubsystemProxy subsystem, Path file, Principal value, LinkOption... options) throws IOException | |
| syncFileData | back to summary |
|---|---|
| public default void syncFileData(SftpSubsystemProxy subsystem, FileHandle fileHandle, Path file, String handle, Channel channel) throws IOException Called when file meta-data re-synchronization is required
| |
| tryLock | back to summary |
|---|---|
| public default FileLock tryLock(SftpSubsystemProxy subsystem, FileHandle fileHandle, Path file, String handle, Channel channel, long position, long size, boolean shared) throws IOException Called when locking a section of a file is requested
| |