Purple Code

com.purpletech.util
Class FileUtils

java.lang.Object
  |
  +--com.purpletech.util.FileUtils

public class FileUtils
extends java.lang.Object

Miscellaneous file-related utility methods. OBSOLETE: all routines moved to com.purpletech.util.IOUtils

Version:
$Id: FileUtils.java,v 1.5 2002/03/13 22:13:24 alex Exp $

Constructor Summary
FileUtils()
           
 
Method Summary
static java.lang.String fixPath(java.lang.String path)
          Deprecated.  
static java.util.Stack getPathStack(java.lang.String path)
          Deprecated.  
static boolean isDiff(java.io.File a, java.io.File b)
          Deprecated.  
static boolean isDiff(java.io.InputStream a, java.io.InputStream b)
          Deprecated.  
static java.lang.String loadFile(java.io.File file)
          Deprecated.  
static void log(java.lang.String s)
          Deprecated.  
static void writeFile(java.io.File dir, java.lang.String name, java.io.InputStream data)
          Deprecated.  
static void writeProperties(java.io.File dir, java.lang.String name, java.util.Properties prop)
          Deprecated.  
static void writeString(java.io.File file, java.lang.String data)
          Deprecated.  
static void writeString(java.io.File dir, java.lang.String name, java.lang.String data)
          Deprecated.  
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileUtils

public FileUtils()
Method Detail

log

public static void log(java.lang.String s)
Deprecated.  


loadFile

public static java.lang.String loadFile(java.io.File file)
                                 throws java.io.IOException
Deprecated.  

java.io.IOException

writeFile

public static void writeFile(java.io.File dir,
                             java.lang.String name,
                             java.io.InputStream data)
                      throws java.io.IOException
Deprecated.  

write the file as raw data

Parameters:
dir - directory to put the file in
name - name of new file
data - the data to write in the file
java.io.IOException

writeString

public static void writeString(java.io.File dir,
                               java.lang.String name,
                               java.lang.String data)
                        throws java.io.IOException
Deprecated.  

java.io.IOException

writeString

public static void writeString(java.io.File file,
                               java.lang.String data)
                        throws java.io.IOException
Deprecated.  

java.io.IOException

writeProperties

public static void writeProperties(java.io.File dir,
                                   java.lang.String name,
                                   java.util.Properties prop)
                            throws java.io.IOException
Deprecated.  

java.io.IOException

fixPath

public static java.lang.String fixPath(java.lang.String path)
                                throws java.io.IOException
Deprecated.  

removes "./" and "foo/../" and trailing "/" from pathname turns \ into /

java.io.IOException

getPathStack

public static java.util.Stack getPathStack(java.lang.String path)
                                    throws java.io.IOException
Deprecated.  

java.io.IOException

isDiff

public static boolean isDiff(java.io.File a,
                             java.io.File b)
                      throws java.io.IOException
Deprecated.  

compares the contents of two files

Returns:
true if the two files differ at any point
java.io.IOException

isDiff

public static boolean isDiff(java.io.InputStream a,
                             java.io.InputStream b)
                      throws java.io.IOException
Deprecated.  

compares the contents of two streams

Returns:
true if the two streams differ at any point
java.io.IOException

Documentation generated March 5 2003