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

com.github.yingzhuo.fastdfs.springboot.client.GenerateStorageClient Maven / Gradle / Ivy

The newest version!
package com.github.yingzhuo.fastdfs.springboot.client;

import com.github.yingzhuo.fastdfs.springboot.domain.fdfs.FileInfo;
import com.github.yingzhuo.fastdfs.springboot.domain.fdfs.MetaData;
import com.github.yingzhuo.fastdfs.springboot.domain.fdfs.StorePath;
import com.github.yingzhuo.fastdfs.springboot.domain.proto.storage.DownloadCallback;

import java.io.InputStream;
import java.util.Set;

/**
 * 基本文件存储客户端操作
 *
 * @author tobato
 */
public interface GenerateStorageClient {

    /*
     * 上传文件(文件不可修改)
     */
    public StorePath uploadFile(String groupName, InputStream inputStream, long fileSize, String fileExtName);

    /*
     * 上传从文件
     */
    public StorePath uploadSlaveFile(String groupName, String masterFilename, InputStream inputStream, long fileSize,
                                     String prefixName, String fileExtName);

    /*
     * 获取文件元信息
     */
    public Set getMetadata(String groupName, String path);

    /*
     * 修改文件元信息(覆盖)
     */
    public void overwriteMetadata(String groupName, String path, Set metaDataSet);

    /*
     * 修改文件元信息(合并)
     */
    public void mergeMetadata(String groupName, String path, Set metaDataSet);

    /*
     * 查看文件的信息
     */
    public FileInfo queryFileInfo(String groupName, String path);

    /*
     * 删除文件
     */
    public void deleteFile(String groupName, String path);

    /*
     * 下载整个文件
     */
    public  T downloadFile(String groupName, String path, DownloadCallback callback);

    /*
     * 下载文件片段
     */
    public  T downloadFile(String groupName, String path, long fileOffset, long fileSize, DownloadCallback callback);

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy