IFileProxy.java 1.2 KB
Newer Older
Z
zhuangqian 已提交
1
/**
Z
update  
zhuangqian 已提交
2
 * Copyright (c) 2015-2017, Chill Zhuang 庄骞 (smallchill@163.com).
Z
zhuangqian 已提交
3 4 5 6 7 8 9 10 11 12 13 14 15
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
S
smallchill 已提交
16
package org.springblade.core.toolbox.file;
Z
zhuangqian 已提交
17 18 19

import java.io.File;

20 21 22 23
/**
 * IFileProxy
 * @author zhuangqian
 */
Z
zhuangqian 已提交
24 25 26
public interface IFileProxy {
	
	/**
Z
zhuangqian 已提交
27
	 * 返回路径[物理路径][虚拟路径]
Z
zhuangqian 已提交
28
	 * @param dir
Z
zhuangqian 已提交
29 30 31
	 * @param file
	 * @return
	 */
Z
zhuangqian 已提交
32
	String [] path(File file, String dir);
Z
zhuangqian 已提交
33 34 35

	/**
	 * 文件重命名策略
36
	 * @param f
Z
zhuangqian 已提交
37
	 * @param path
Z
zhuangqian 已提交
38 39
	 * @return
	 */
Z
zhuangqian 已提交
40
	File rename(File f, String path);
41 42 43 44 45 46

    /**
     * 获取入库id
     * @param bf
     * @return
     */
Z
zhuangqian 已提交
47
	Object getFileId(BladeFile bf);
48 49 50 51 52

    /**
     * 图片压缩
     * @param path
     */
Z
zhuangqian 已提交
53 54
	void compress(String path);
	
Z
zhuangqian 已提交
55
}