ucar.unidata.util
Class IOUtil.FileWrapper

java.lang.Object
  extended by ucar.unidata.util.IOUtil.FileWrapper
All Implemented Interfaces:
Comparable
Enclosing class:
IOUtil

public static class IOUtil.FileWrapper
extends Object
implements Comparable

Wrapper for a file for doing comparisons

Version:
$Revision: 1.52 $
Author:
IDV Development Team

Constructor Summary
IOUtil.FileWrapper(File f, boolean youngestFirst)
          Create a FileWrapper for the file with the appropriate sorting
 
Method Summary
 int compareTo(Object o)
          Compare the object
 boolean delete()
          _more_
 File getFile()
          Return the file
 boolean isDirectory()
          _more_
 long lastModified()
          _more_
 long length()
          _more_
static IOUtil.FileWrapper[] toArray(File[] files, boolean youngestFirst)
          _more_
static IOUtil.FileWrapper[] toArray(List<File> files, boolean youngestFirst)
          _more_
 String toString()
          _more_
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

IOUtil.FileWrapper

public IOUtil.FileWrapper(File f,
                          boolean youngestFirst)
Create a FileWrapper for the file with the appropriate sorting

Parameters:
f - File to wrap
youngestFirst - flag for sorting
Method Detail

toString

public String toString()
_more_

Overrides:
toString in class Object
Returns:
_more_

getFile

public File getFile()
Return the file

Returns:
the file

lastModified

public long lastModified()
_more_

Returns:
_more_

isDirectory

public boolean isDirectory()
_more_

Returns:
_more_

delete

public boolean delete()
_more_

Returns:
_more_

length

public long length()
_more_

Returns:
_more_

toArray

public static IOUtil.FileWrapper[] toArray(File[] files,
                                           boolean youngestFirst)
_more_

Parameters:
files - _more_
youngestFirst - _more_
Returns:
_more_

toArray

public static IOUtil.FileWrapper[] toArray(List<File> files,
                                           boolean youngestFirst)
_more_

Parameters:
files - _more_
youngestFirst - _more_
Returns:
_more_

compareTo

public int compareTo(Object o)
Compare the object

Specified by:
compareTo in interface Comparable
Parameters:
o - object to compare
Returns:
comparison value