com.notuvy.file
Class Directory
java.lang.Object
com.notuvy.file.Directory
public class Directory
- extends Object
A utility for managing directories.
- Version:
- $Id: Directory.java,v 1.5 2006/06/20 04:52:41 murali Exp $
- Author:
- murali
HOME
public static final Directory HOME
APP_HOME_PROPERTY
public static final String APP_HOME_PROPERTY
- See Also:
- Constant Field Values
Directory
public Directory(File pFile)
Directory
public Directory(String pString)
ensure
public static Directory ensure(String pFilename)
ensure
public static Directory ensure(File pFile)
ensureInHome
public static Directory ensureInHome(String pFilename)
getFile
public File getFile()
ensure
public void ensure()
entry
public File entry(String pFilename)
subdir
public Directory subdir(String pFilename)
setAppHome
public Directory setAppHome()
listContents
public List<File> listContents()
- Find all the (first level) contents of this directory.
- Returns:
- Unordered list of files, potentially a mix of plain files and subdirectories.
listDeepContents
public List<File> listDeepContents()
- Find all the full depth contents of this directory. Follow all subdirectories.
That is, do a depth-first search for all plain files.
- Returns:
- Unordered list of plain files.
contents
public DirectoryContents contents()
- Create the structure containing the contents of this directory, with
plain files and subdirs segregated.
- Returns:
- contents in a structured object.
listContents
public List<File> listContents(FilenameFilter pFilter)
isEmpty
public boolean isEmpty()
clear
public void clear()
findFileInSubdir
public Collection<File> findFileInSubdir(String pFilename)
relativeNameOf
public String relativeNameOf(File pFile)
toString
public String toString()
- Overrides:
toString
in class Object
Copyright © 2013. All Rights Reserved.