org.apache.camel.util
Class FileUtil

java.lang.Object
  extended by org.apache.camel.util.FileUtil

public final class FileUtil
extends Object

File utilities


Method Summary
static String compactPath(String path)
          Compacts a path by stacking it and reducing ..
static File createTempFile(String prefix, String suffix)
           
static File createTempFile(String prefix, String suffix, File parentDir)
           
static void delete(File f)
           
static void mkDir(File dir)
           
static String normalizePath(String path)
          Normalizes the path to cater for Windows and other platforms
static String onlyPath(String name)
          Returns only the leading path (returns null if no path)
static void removeDir(File d)
           
static String stripExt(String name)
           
static String stripLeadingSeparator(String name)
          Strip any leading separators
static String stripPath(String name)
          Strips any leading paths
static String stripTrailingSeparator(String name)
          Strip any trailing separators
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

normalizePath

public static String normalizePath(String path)
Normalizes the path to cater for Windows and other platforms


mkDir

public static void mkDir(File dir)

removeDir

public static void removeDir(File d)

delete

public static void delete(File f)

createTempFile

public static File createTempFile(String prefix,
                                  String suffix)
                           throws IOException
Throws:
IOException

createTempFile

public static File createTempFile(String prefix,
                                  String suffix,
                                  File parentDir)
                           throws IOException
Throws:
IOException

stripLeadingSeparator

public static String stripLeadingSeparator(String name)
Strip any leading separators


stripTrailingSeparator

public static String stripTrailingSeparator(String name)
Strip any trailing separators


stripPath

public static String stripPath(String name)
Strips any leading paths


stripExt

public static String stripExt(String name)

onlyPath

public static String onlyPath(String name)
Returns only the leading path (returns null if no path)


compactPath

public static String compactPath(String path)
Compacts a path by stacking it and reducing ..



Apache CAMEL