net.sf.ant4eclipse.lang
Class Utilities

java.lang.Object
  extended by net.sf.ant4eclipse.lang.Utilities

public class Utilities
extends java.lang.Object

Collection of utility functions that aren't specific to A4E.


Method Summary
static java.lang.String calcRelative(java.io.File fromfile, java.io.File tofile)
          Calculates a relative path for the supplied files.
static boolean delete(java.io.File file)
          Returns true if the supplied path could be deleted completely.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

delete

public static final boolean delete(java.io.File file)
Returns true if the supplied path could be deleted completely. In case of a directory the complete tree will be deleted.

Parameters:
file - The path which shall be removed.
Returns:
true <=> The path could be deleted with success.

calcRelative

public static final java.lang.String calcRelative(java.io.File fromfile,
                                                  java.io.File tofile)
Calculates a relative path for the supplied files.

Parameters:
fromfile - Starting point within a filesystem.
tofile - Ending point within a filesystem.
Returns:
The file which indicates the relative path. null in case the relative path could not be calculated.