org.codehaus.plexus.components.io.fileselectors
Interface FileInfo

All Known Subinterfaces:
PlexusIoResource, PlexusIoResourceWithAttributes
All Known Implementing Classes:
AbstractPlexusIoResource, AbstractPlexusIoResourceWithAttributes, PlexusIoFileResource, PlexusIoProxyResource, PlexusIoProxyResourceWithAttributes, PlexusIoURLResource

public interface FileInfo

An object implementing this interface is passed to the file selector when the method FileSelector.isSelected(FileInfo) is invoked. This object provides information about the file to select or deselect.


Method Summary
 java.io.InputStream getContents()
          Creates an InputStream, which may be used to read the files contents.
 java.lang.String getName()
          Returns the resources name, which may include path components, like directory names, or something like that.
 boolean isDirectory()
          Returns, whether the FileInfo refers to a directory.
 boolean isFile()
          Returns, whether the FileInfo refers to a file.
 

Method Detail

getName

java.lang.String getName()
Returns the resources name, which may include path components, like directory names, or something like that. The resources name is expected to be a relative name and the path components must be separated by File.pathSeparator


getContents

java.io.InputStream getContents()
                                throws java.io.IOException
Creates an InputStream, which may be used to read the files contents. This is useful, if the file selector comes to a decision based on the files contents.

Throws:
java.io.IOException

isFile

boolean isFile()
Returns, whether the FileInfo refers to a file.


isDirectory

boolean isDirectory()
Returns, whether the FileInfo refers to a directory.



Copyright © 2001-2011 Codehaus. All Rights Reserved.