org.expasy.jpl.commons.base.io
Class JPLFile

java.lang.Object
  extended by java.io.File
      extended by 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

Field Summary
 
Fields inherited from class java.io.File
pathSeparator, pathSeparatorChar, separator, separatorChar
 
Constructor Summary
JPLFile(String fileName)
           
 
Method Summary
static void copy(File file1, File file2)
           
 String getBaseName()
           
static String getBaseName(String filename)
           
 String getBaseNameNoExt()
           
static String getBaseNameNoExt(String filename)
           
 String getDirName()
           
static String getDirName(String filename)
           
 String getExtension()
           
static String getExtension(String filename)
           
 boolean hasExtension()
           
static boolean hasExtension(String filename)
           
 String toString()
           
 
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
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

JPLFile

public JPLFile(String fileName)
Method Detail

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.