org.apache.jetspeed.util
Interface FileSystemHelper


public interface FileSystemHelper

Author:
Scott T. Weaver TODO To change the template for this generated type comment go to Window - Preferences - Java - Code Generation - Code and Comments

Method Summary
 void close()
           close
 void copyFrom(File directory)
           copyFrom
 void copyFrom(File directory, FileFilter fileFilter)
           copyFrom
 long getChecksum(String pathToResource)
          Given a path to a resource in this file system, return a checksum on that resource's content.
 File getRootDirectory()
           getRootDirectory
 String getSourcePath()
           getSourcePath
 boolean remove()
           remove
 

Method Detail

copyFrom

void copyFrom(File directory)
              throws IOException

copyFrom

Parameters:
directory - Directory to copy content from
Throws:
{@link - java.io.IlleaglArgumentException} if the directory.isDirectory returns false
IOException

copyFrom

void copyFrom(File directory,
              FileFilter fileFilter)
              throws IOException

copyFrom

Parameters:
directory -
fileFilter -
Throws:
IOException

remove

boolean remove()

remove

Removes the underlying directory structure from the root directory down.

Returns:
true if the removal war successful, otherwise returns false.

getRootDirectory

File getRootDirectory()

getRootDirectory

Returns:
the root of the directory structure

close

void close()
           throws IOException

close

Cleans up resources opened up specifically by this FileSystemHelper

Throws:
IOException

getSourcePath

String getSourcePath()

getSourcePath

Returns the true location of this FileSystemHelper backing object on the file system. This IS NOT always as the path of the object returned from the getRootDirectory method.

Returns:
the true location of this FileSystemHelper backing object.

getChecksum

long getChecksum(String pathToResource)
Given a path to a resource in this file system, return a checksum on that resource's content.

Parameters:
pathToResource -
Returns:
checksum of the content of the resource


Copyright © 1999-2007 Apache Software Foundation. All Rights Reserved.