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

cc.kebei.expands.request.ftp.FtpRequest Maven / Gradle / Ivy

There is a newer version: 3.0.6
Show newest version
package cc.kebei.expands.request.ftp;

import org.apache.commons.net.ftp.FTPClient;
import org.apache.commons.net.ftp.FTPFile;

import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.util.List;
import java.util.function.Consumer;

/**
 * Created by Kebei on 16-6-24.
 */
public interface FtpRequest {

    FtpRequest encode(String encode);

    FtpRequest login() throws IOException;

    boolean logout() throws IOException;

    List lsDir() throws IOException;

    List lsDir(String path) throws IOException;

    List ls() throws IOException;

    List ls(String path) throws IOException;

    boolean mkdir(String path) throws IOException;

    FtpRequest cd(String path) throws IOException;

    boolean rename(String oldName, String newName) throws IOException;

    boolean rm(String name) throws IOException;

    boolean upload(String fileName, InputStream inputStream) throws IOException;

    boolean upload(File file) throws IOException;

    void download(String name, OutputStream outputStream) throws IOException;

    FtpRequest setting(Consumer clientConsumer);
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy