Skip to content

Latest commit

 

History

History
46 lines (38 loc) · 1.51 KB

File metadata and controls

46 lines (38 loc) · 1.51 KB

SuprFiles

A Java file library allowing you to access local, SFTP and SMB files using the same functions.

Maven2

<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>

An Example

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>.");

Used Libraries