Skip to content

Stable release 1.0

Latest
Compare
Choose a tag to compare
@marlonrcfranco marlonrcfranco released this 11 Sep 13:40
· 66 commits to master since this release
0418f37

Contains:

Supported protocols:

  • FileSystem (local);
  • SMB 1 (remote);
  • SMB 2/3 (remote); and
  • NFS (remote);

Available methods:

read

public String read(String IP, String filePath, String user, String pass) throws IOException;

Returns the content of a file as a String;


readBytes

public byte[] readBytes(String IP, String filePath, String user, String pass) throws IOException;

Returns the content of a file as byte[];


write

public String write(String IP, String filePath, String user, String pass, String content) throws IOException;

Writes a String to a file (overwrites or creates the file, also creating all the directories missing in the path);


writeBytes

public byte[] writeBytes(String IP, String filePath, String user, String pass, byte[] content) throws IOException;

Writes a byte[] to a file (overwrites or creates the file, also creating all the directories missing in the path);


delete

public String delete(String IP, String filePath, String user, String pass) throws IOException;

Deletes files or directories;


listFiles

public String listFiles(String IP, String filePath, String user, String pass) throws IOException;

Returns a String with all the files and directories in a given path.


listFilesAsList

public ArrayList listFilesAsList(String IP, String filePath, String user, String pass) throws Exception;

Returns an ArrayList of objects according to the protocol. E.g. for filesystem protocol, it will return ArrayList<java.io.File>; for smb1 protocol, it will return ArrayList<jcifs.smb.SmbFile>, and so on.