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

src.org.neodatis.tool.wrappers.io.OdbFile Maven / Gradle / Ivy

There is a newer version: 1.9.30.689
Show newest version
package org.neodatis.tool.wrappers.io;

import java.io.File;

/**
 * @sharpen.ignore
 * @author olivier
 *
 */
public class OdbFile {
	private File file;
	
	public OdbFile(String fileName){
		String fullPath = new File(fileName).getAbsolutePath();
		this.file = new File(fullPath);
	}
	
	public String getDirectory(){
		return file.getParentFile().getAbsolutePath();
	}

	public String getCleanFileName(){
		return file.getName();
	}
	
	public String getFullPath(){
		return file.getAbsolutePath();
	}

	public boolean exists() {
		return file.exists();
	}
	
	public void clear(){
		file = null;
	}

	public OdbFile getParentFile() {
		return new OdbFile(file.getParent());
	}

	public void mkdirs() {
		file.mkdirs();
	}

	public boolean delete() {
		return file.delete();
	}

	/* (non-Javadoc)
	 * @see java.lang.Object#toString()
	 */
	@Override
	public String toString() {
		return file.getAbsolutePath();
	}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy