All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.flightstats.filesystem.FileSystem Maven / Gradle / Ivy

package com.flightstats.filesystem;

import java.io.InputStream;
import java.io.OutputStream;
import java.nio.file.Path;
import java.util.List;

public interface FileSystem {
    OutputStream outputStream(Path fileName);

    InputStream inputStream(Path fileName);

    String readContents(Path fileName);

    boolean exists(Path fileName);

    void saveContent(String content, Path fileName);

    /**
     * This will return a list of all paths that are prefixed with the provided Path, even if that Path doesn't point at
     * a "directory", per se.  If the path does not exist, an empty List will be returned.
     */
    List listFiles(Path prefixPath);

    void move(Path file, Path destinationDirectory);
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy