org.expasy.jpl.commons.base.io
Class JPLFile
java.lang.Object
java.io.File
org.expasy.jpl.commons.base.io.JPLFile
- All Implemented Interfaces:
- Serializable, Comparable<File>
public final class JPLFile
- extends File
A File that supports localized paths
Also adds basename/dirname functionality.
Note: This kind of crosses the line between the core interpreter and the
"util" package. It's here so that we're consistent in the source() feature of
the interpreter.
- See Also:
- Serialized Form
| Methods inherited from class java.io.File |
canExecute, canRead, canWrite, compareTo, createNewFile, createTempFile, createTempFile, delete, deleteOnExit, equals, exists, getAbsoluteFile, getAbsolutePath, getCanonicalFile, getCanonicalPath, getFreeSpace, getName, getParent, getParentFile, getPath, getTotalSpace, getUsableSpace, hashCode, isAbsolute, isDirectory, isFile, isHidden, lastModified, length, list, list, listFiles, listFiles, listFiles, listRoots, mkdir, mkdirs, renameTo, setExecutable, setExecutable, setLastModified, setReadable, setReadable, setReadOnly, setWritable, setWritable, toURI, toURL |
JPLFile
public JPLFile(String fileName)
getDirName
public String getDirName()
getBaseName
public String getBaseName()
getBaseNameNoExt
public String getBaseNameNoExt()
getExtension
public String getExtension()
hasExtension
public boolean hasExtension()
getDirName
public static String getDirName(String filename)
getBaseName
public static String getBaseName(String filename)
getBaseNameNoExt
public static String getBaseNameNoExt(String filename)
getExtension
public static String getExtension(String filename)
hasExtension
public static boolean hasExtension(String filename)
copy
public static void copy(File file1,
File file2)
throws IOException
- Throws:
IOException
toString
public String toString()
- Overrides:
toString in class File
Copyright (c) 2012 Swiss Institute of Bioinformatics. All rights reserved.