com.threerings.jpkg
Class DestrootWalker

java.lang.Object
  extended by org.apache.commons.io.DirectoryWalker
      extended by com.threerings.jpkg.DestrootWalker

 class DestrootWalker
extends DirectoryWalker

Walks a given destroot appending all files and directories to a PackageTarFile. Package private.

See Also:
PackageTarFile

Nested Class Summary
 
Nested classes/interfaces inherited from class org.apache.commons.io.DirectoryWalker
DirectoryWalker.CancelException
 
Constructor Summary
DestrootWalker(File destroot, PackageTarFile tar)
          Construct a DestrootWalker.
 
Method Summary
protected  void handleDirectoryStart(File directory, int depth, Collection results)
           
protected  void handleFile(File file, int depth, Collection results)
           
 void walk()
          Walk the destroot, adding the contents to the tar file.
 
Methods inherited from class org.apache.commons.io.DirectoryWalker
checkIfCancelled, handleCancelled, handleDirectory, handleDirectoryEnd, handleEnd, handleIsCancelled, handleRestricted, handleStart, walk
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DestrootWalker

public DestrootWalker(File destroot,
                      PackageTarFile tar)
Construct a DestrootWalker.

Parameters:
destroot - The File which is the root of the destroot.
tar - The PackageTarFile which will have the destroot contents added to it.
Method Detail

walk

public void walk()
          throws IOException
Walk the destroot, adding the contents to the tar file. This method should not be called more than once.

Throws:
IOException - If any i/o error is encountered while walking the destroot.

handleDirectoryStart

protected void handleDirectoryStart(File directory,
                                    int depth,
                                    Collection results)
                             throws IOException
Overrides:
handleDirectoryStart in class DirectoryWalker
Throws:
IOException

handleFile

protected void handleFile(File file,
                          int depth,
                          Collection results)
                   throws IOException
Overrides:
handleFile in class DirectoryWalker
Throws:
IOException


Copyright © 2007-2008 Three Rings Design, Inc. All Rights Reserved. Released under a BSD license.