org.exparity.io.filesystem.FileSystem Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of exparity-data Show documentation
Show all versions of exparity-data Show documentation
Data scraping and manipulation utilities for Java
The newest version!
/**
*
*/
package org.exparity.io.filesystem;
import java.io.InputStream;
import java.io.OutputStream;
import java.util.List;
/**
* Class to abstract away file system operations to allow clean unit testing of components which are dependent on file
* system related operations. Instantiate instances of FileSystem classes using the FileSystemFactory class;
*
* @author Stewart Bissett
*/
public interface FileSystem {
public InputStream readFile(String filename);
public OutputStream writeFile(String filename);
public void createFile(String filename);
public void deleteFile(String filename);
public boolean fileExists(String filename);
public boolean directoryExists(String directory);
public void createDirectory(String directory);
public void deleteDirectory(String directory);
public OutputStream appendFile(String filename);
public long fileSize(String filename);
public List listDirs(String path);
public List listFiles(String path);
public String getTempDirectory();
}