Skip to content

3.3

Compare
Choose a tag to compare
@robtimus robtimus released this 11 Dec 18:34
· 6 commits to master since this release

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.