A Java file library allowing you to access local, SFTP and SMB files using the same functions.
<repositories>
<repository>
<id>hellsh</id>
<url>https://mvn2.hell.sh</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>de.timmyrs</groupId>
<artifactId>suprfiles</artifactId>
<version>LATEST</version>
</dependency>
</dependencies>
FileInterface fileInterface;
if(chosenProtocol.equals("local"))
{
fileInterface = new FSInterface();
}
else if(chosenProtocol.equals("sftp"))
{
fileInterface = new SFTPInterface(host, name, pass);
}
else if(chosenProtocol.equals("smb"))
{
fileInterface = new SMBInterface(host, name, pass);
}
SuprFile file = fileInterface.getFile("test.txt");
file.write("This file has been created using SuprFiles <https://github.com/timmyrs/SuprFiles>.");