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

holmos.webtest.basetools.file.MyFileOperation Maven / Gradle / Ivy

There is a newer version: 1.0.2u10
Show newest version
package holmos.webtest.basetools.file;

import java.io.File;
import java.util.ArrayList;

import org.apache.log4j.Logger;
/**
 * @author 吴银龙([email protected])
 * */
public class MyFileOperation {
	private String absolutePath;
	public String getAbsolutePath() {
		return absolutePath;
	}
	public void setAbsolutePath(String absolutePath) {
		this.absolutePath = absolutePath;
	}
	/**这个页面操作的日志记录器*/
	protected static Logger logger=Logger.getLogger(MyFileOperation.class.getName());
	public MyFileOperation(String absolutePath){
		this.absolutePath=absolutePath;
	}
	public boolean isExist(){
		return new File(absolutePath).exists();
	}
	public static void createFile(String path){
		MyFile.createFile(path);
	}
	public ArrayListgetFileContent(){
		return new MyFile(absolutePath).getFileContentByList();
	}
	public void setFileContent(ArrayListfileContent){
		if(fileContent!=null){
			new MyFile(absolutePath).setFileContent(fileContent);
		}
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy