public interface FileInfo extends NameSupplier
FileSelector.isSelected(FileInfo)
is invoked. This object provides information about
the file to select or deselect.Modifier and Type | Method and Description |
---|---|
InputStream |
getContents()
Creates an
InputStream , which may be used to read
the files contents. |
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. |
String getName()
File.pathSeparator
getName
in interface NameSupplier
InputStream getContents() throws 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.IOException
boolean 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.Copyright © 2001–2019 Codehaus Plexus. All rights reserved.