Releases: robtimus/sftp-fs
3.3.1
3.3
SFTPFileSystemProvider
now allows URIs with user info and paths when creating new SFTP file systems. These are used for the user credentials and default directory respectively. However, if the given environment already contains user credentials the URI still cannot contain any user info, and if the given environment already contains a default directory the URI still cannot contain a path (except for a single /
, which is now always allowed).
SFTPFileSystemProvider
now tries to create a new SFTP file system when getPath
is called for a non-existing SFTP file system, using the user info of the URI for the user credentials. Any other settings cannot be provided through the URI (including the default directory). To still be able to provide these, SFTPEnvironment
now has method setDefault
. This can be useful for providing pool configurations, timeouts, etc. URIs can also contain query parameters to provide URI-specific settings; see usages of QueryParam and QueryParams for the possible query parameters.
SFTP paths are now normalized before being used in SFTP commands. This prevents unexpected errors when used with relative paths or an empty path.
SFTPEnvironment
now uses a default 30 second connect timeout. This should prevent infinite waiting if connections cannot be established.
SFTPEnvironment.copy
no longer fails when called with a null
map but instead returns an empty environment.
3.2
3.1
Updated to use the latest JSch version.
Added SFTPEnvironment.withConfigRepository
that makes it possible to configure a ConfigRepository
.
FileSystemProvider.getFileAttributeView
ignored the link options. This is now fixed.
FileStore.supportsFileAttributeView
now correctly returns true for FileOwnerAttributeView.class
.
FileStore.getBlockSize
(Java 10 or up) is implemented if the backing server supports statvfs.
Keys in maps returned by FileSystemProvider.readAttribute
were incorrectly prefixed with the view name, e.g. basic:size
instead of size
. This is no longer the case. However, the old behaviour can be turned back on by setting system property com.github.robtimus.filesystems.sftp.prefixAttributes
to true.
3.0.1
3.0
- Replaced methods
withClientConnectionCount
andwithClientConnectionWaitTimeout
ofSFTPEnvironment
with new methodwithPoolConfig
. This provides more control over the pool of connections, including an initial size that's smaller than the maximum size (#10). SFTPEnvironment
no longer implementsCloneable
. Instead of usingclone
, use new static methodcopy
.SFTPEnvironment.withFilenameEncoding
now takes aCharset
instead of a string.- Replaced the old JSch dependency, which hadn't been updated in years, with https://github.com/mwiede/jsch (#11). This is mostly a drop-in replacement, but with the SSH agent support integrated. There's no more need to include additional dependencies to use agents like Pageant. Note that some older or deprecated algorithms are no longer supported out-of-the-box. See https://github.com/mwiede/jsch for more information and solutions.
2.0.6
Fixed the allowed combinations of open options for SFTPFileSystemProvider.newByteChannel
. TRUNCATE_EXISTING
, CREATE_NEW
and CREATE
are now correctly ignored when opening the channel in read-only mode.
Note that read-write mode is still not supported due to limitations of the SFTP communication.
2.0.5
When calling SFTPFileSystemProvider.newByteChannel
with WRITE
but not APPEND
, the initial size of the returned channel was incorrectly set to the file's old size.
Classes SFTPMessages
and SFTPLogger
now work properly on Java 11 and up. Older versions would trigger an UnsupportedOperationException
due to the use of a custom ResourceBundle.Control
.