Interface IResourceInfo
- All Superinterfaces:
Serializable
- All Known Implementing Classes:
FileInfo
,PackageInfo
,UrlResource
This class contains various properties of a resource.
- Since:
- 6.0
- Author:
- O. Kerpershoek
-
Method Summary
Modifier and TypeMethodDescriptionboolean
exists()
This method can be used to determine if the resource is available.getName()
This method returns the name of the resource.getURI()
This method returns a Uniform Resource Identifier object for the resource.boolean
isFile()
This method returns a boolean indicating if the resource represents a file.boolean
isFolder()
This method returns a boolean indicating if the resource represents a folder.boolean
This method can be used to determine if the resource is read-only.This method returns the last modification date value for the resource.
-
Method Details
-
exists
boolean exists()This method can be used to determine if the resource is available.- Returns:
- boolean indicating if the resource is available.
-
isReadOnly
boolean isReadOnly()This method can be used to determine if the resource is read-only. When this method returns true, the asOutputStream and asWriter methods of the resource won't be available.- Returns:
- boolean indicating if the resource is read-only.
-
isFile
boolean isFile()This method returns a boolean indicating if the resource represents a file.- Returns:
- a boolean indicating if the resource represents a file.
-
isFolder
boolean isFolder()This method returns a boolean indicating if the resource represents a folder.- Returns:
- a boolean indicating if the resource represents a folder.
-
getName
String getName()This method returns the name of the resource.- Returns:
- the name of the resource.
-
getURI
URI getURI()This method returns a Uniform Resource Identifier object for the resource.- Returns:
- Uniform Resource Identifier object for the resource.
-
lastModified
DateValue lastModified()This method returns the last modification date value for the resource.- Returns:
- The last modification date, will return DateValue.UNKNOWN when no modification date could be determined.
-