com.faunos.util.boot
Class FileResolver

java.lang.Object
  extended by com.faunos.util.boot.FileResolver
Direct Known Subclasses:
AbstractFileResolver

public abstract class FileResolver
extends Object

An abstraction for resolving filepaths. A FileResolver implementation never actually creates a file. It does however provide certain guarantees that a file can indeed be created or opened.


Nested Class Summary
static class FileResolver.Constraints
           
 
Constructor Summary
FileResolver()
           
 
Method Summary
abstract  File resolve(String path, FileResolver.Constraints arg)
          Resolves and returns a file that satisfies the specified constraints, or null, if the constraints cannot be satisfied.
 File resolveDirectory(String path)
           
 File resolveExistingDirectory(String path)
           
 File resolveExistingFile(String path)
           
 File resolveFile(String path)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileResolver

public FileResolver()
Method Detail

resolveDirectory

public final File resolveDirectory(String path)

resolveExistingDirectory

public final File resolveExistingDirectory(String path)

resolveFile

public final File resolveFile(String path)

resolveExistingFile

public final File resolveExistingFile(String path)

resolve

public abstract File resolve(String path,
                             FileResolver.Constraints arg)
Resolves and returns a file that satisfies the specified constraints, or null, if the constraints cannot be satisfied.



SourceForge.net Logo