org.codehaus.cargo.util
Class FileUtils

java.lang.Object
  extended by org.codehaus.cargo.util.FileUtils

Deprecated. use FileHandler instead

public class FileUtils
extends java.lang.Object

Set of common File manipulation utility methods.

Version:
$Id: FileUtils.java 1029 2006-05-21 20:21:47Z vmassol $

Constructor Summary
FileUtils()
          Deprecated.  
 
Method Summary
 void copy(java.io.InputStream in, java.io.OutputStream out)
          Deprecated. Copies data from an InputStream to an OutputStream.
 void copy(java.io.InputStream in, java.io.OutputStream out, int bufSize)
          Deprecated. Copies data from an InputStream to an OutputStream.
 java.io.File createDirectory(java.io.File parentDir, java.lang.String name)
          Deprecated. 
 java.io.File createDirectory(java.net.URI parentDir, java.lang.String name)
          Deprecated. Convenience method for creating a new directory inside another one.
 java.io.File createTmpDirectory(java.lang.String name)
          Deprecated. Creates a temporary directory.
 java.io.File createUniqueTmpDirectory()
          Deprecated. Creates a unique temporary directory.
 void delete(java.io.File item)
          Deprecated. Deletes a file or directory, removing any children as appropriate.
 java.lang.String getFilename(java.lang.String filePath)
          Deprecated. Convenience method that returns a relative filename and its extension from a complete file path (path, name and extension).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileUtils

public FileUtils()
Deprecated. 
Method Detail

createDirectory

public final java.io.File createDirectory(java.net.URI parentDir,
                                          java.lang.String name)
                                   throws java.io.IOException
Deprecated. 
Convenience method for creating a new directory inside another one.

Parameters:
parentDir - The directory in which the new directory should be created
name - The name of the directory to create
Returns:
The new directory
Throws:
java.io.IOException - If the directory could not be created

createDirectory

public final java.io.File createDirectory(java.io.File parentDir,
                                          java.lang.String name)
                                   throws java.io.IOException
Deprecated. 

Throws:
java.io.IOException
See Also:
createDirectory(URI, String)

createTmpDirectory

public java.io.File createTmpDirectory(java.lang.String name)
Deprecated. 
Creates a temporary directory.

Parameters:
name - The name of the directory to create
Returns:
the newly created temporary directory

getFilename

public final java.lang.String getFilename(java.lang.String filePath)
Deprecated. 
Convenience method that returns a relative filename and its extension from a complete file path (path, name and extension).

Parameters:
filePath - the full file path (including relative name and extension)
Returns:
the filename with its extension

createUniqueTmpDirectory

public java.io.File createUniqueTmpDirectory()
Deprecated. 
Creates a unique temporary directory.

Returns:
the newly created temporary directory

copy

public void copy(java.io.InputStream in,
                 java.io.OutputStream out)
          throws java.io.IOException
Deprecated. 
Copies data from an InputStream to an OutputStream.

Parameters:
in - InputStream to copy data from
out - OutputStream to copy data to
Throws:
java.io.IOException - if an I/O error occurs

copy

public void copy(java.io.InputStream in,
                 java.io.OutputStream out,
                 int bufSize)
          throws java.io.IOException
Deprecated. 
Copies data from an InputStream to an OutputStream.

Parameters:
in - InputStream to copy data from
out - OutputStream to copy data to
bufSize - size of the copy buffer
Throws:
java.io.IOException - if an I/O error occurs

delete

public void delete(java.io.File item)
Deprecated. 
Deletes a file or directory, removing any children as appropriate.

Parameters:
item - in file or directory to remove


Copyright © 2004-2011 Codehaus. All Rights Reserved.