Apache Virtual File System (VFS) and Secure File Transfer Protocol (SFTP)
The Apache Virtual File System provides an abstraction for various file systems, enabling a Java program to reliably access different types of file system through the same abstraction / contract, such an example would be being able to access both a local file system and a remote SFTP server.
When using the SFTP provider it is worth noting that the JSch (Java Secure Channel) maven dependency is required:
<dependency>
<groupId>com.jcraft</groupId>
<artifactId>jsch</artifactId>
<version>0.1.54</version>
</dependency>
Without this you will get nonsensical error messages when attempting to connect to the SFTP server, this information is buried in the JavaDoc of the SFTPClientFactory.
There is a bug finding the isReadable value over the SFTP provider when using version 2.1 or higher of VFS so if that is a deal breaker I’d recommend using version 2.0 until the linked bug report is resolved.