org.apache.aries.application.utils.filesystem.impl
Class DirectoryImpl
java.lang.Object
org.apache.aries.application.utils.filesystem.impl.FileImpl
org.apache.aries.application.utils.filesystem.impl.DirectoryImpl
- All Implemented Interfaces:
- Iterable<IFile>, IDirectory, IFile
public class DirectoryImpl
- extends FileImpl
- implements IDirectory
An IDirectory representing a java.io.File whose isDirectory method returns true.
DirectoryImpl
public DirectoryImpl(File dir,
File rootFile)
- Parameters:
dir - the file to represent.rootFile - the file that represents the FS root.
getFile
public IFile getFile(String name)
- Specified by:
getFile in interface IDirectory
isRoot
public boolean isRoot()
- Specified by:
isRoot in interface IDirectory
listFiles
public List<IFile> listFiles()
- Specified by:
listFiles in interface IDirectory
listAllFiles
public List<IFile> listAllFiles()
- Specified by:
listAllFiles in interface IDirectory
iterator
public Iterator<IFile> iterator()
- Specified by:
iterator in interface Iterable<IFile>
getParent
public IDirectory getParent()
- Specified by:
getParent in interface IFile- Overrides:
getParent in class FileImpl
convert
public IDirectory convert()
- Specified by:
convert in interface IFile- Overrides:
convert in class FileImpl
open
public InputStream open()
throws IOException
- Specified by:
open in interface IFile- Overrides:
open in class FileImpl
- Throws:
IOException
getLastModified
public long getLastModified()
- Specified by:
getLastModified in interface IFile- Overrides:
getLastModified in class FileImpl
Copyright © 2009-2011 The Apache Software Foundation. All Rights Reserved.