NameSupplierPlexusIoResourceAbstractPlexusIoResource, PlexusIoFileResource, PlexusIoSymlinkResource, PlexusIoURLResourcepublic interface FileInfo extends NameSupplier
FileSelector.isSelected(FileInfo)
is invoked. This object provides information about
the file to select or deselect.| Modifier and Type | Method | Description |
|---|---|---|
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. |
boolean |
isSymbolicLink() |
Returns, whether the
FileInfo refers to a symlink. |
java.lang.String getName()
File.pathSeparatorgetName in interface NameSupplierjava.io.InputStream getContents()
throws java.io.IOException
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.java.io.IOExceptionboolean isFile()
FileInfo refers to a file.
This does not necessarily mean that the underlying representation *is* a file on disk,
but that this resource represents a file.boolean isDirectory()
FileInfo refers to a directory.
This does not necessarily mean that the underlying representation *is* a directory on disk,
but that this resource represents a directory.boolean isSymbolicLink()
FileInfo refers to a symlink.
This does not necessarily mean that the underlying representation *is* a symlink on disk,
but that this resource represents a symlink.
This method will return "false" for java versions prior to java7.