Class FileInfo
java.lang.Object
com.aquima.interactions.foundation.io.resource.FileInfo
- All Implemented Interfaces:
IResourceInfo
,Serializable
This class holds the resource information of a file resource.
- Since:
- 6.0
- Author:
- O. Kerpershoek
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
exists()
This method can be used to determine if the resource is available.protected File
getFile()
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.
-
Constructor Details
-
FileInfo
-
-
Method Details
-
getFile
-
exists
public boolean exists()Description copied from interface:IResourceInfo
This method can be used to determine if the resource is available.- Specified by:
exists
in interfaceIResourceInfo
- Returns:
- boolean indicating if the resource is available.
-
getName
Description copied from interface:IResourceInfo
This method returns the name of the resource.- Specified by:
getName
in interfaceIResourceInfo
- Returns:
- the name of the resource.
-
getURI
Description copied from interface:IResourceInfo
This method returns a Uniform Resource Identifier object for the resource.- Specified by:
getURI
in interfaceIResourceInfo
- Returns:
- Uniform Resource Identifier object for the resource.
-
isFile
public boolean isFile()Description copied from interface:IResourceInfo
This method returns a boolean indicating if the resource represents a file.- Specified by:
isFile
in interfaceIResourceInfo
- Returns:
- a boolean indicating if the resource represents a file.
-
isFolder
public boolean isFolder()Description copied from interface:IResourceInfo
This method returns a boolean indicating if the resource represents a folder.- Specified by:
isFolder
in interfaceIResourceInfo
- Returns:
- a boolean indicating if the resource represents a folder.
-
isReadOnly
public boolean isReadOnly()Description copied from interface:IResourceInfo
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.- Specified by:
isReadOnly
in interfaceIResourceInfo
- Returns:
- boolean indicating if the resource is read-only.
-
lastModified
Description copied from interface:IResourceInfo
This method returns the last modification date value for the resource.- Specified by:
lastModified
in interfaceIResourceInfo
- Returns:
- The last modification date, will return DateValue.UNKNOWN when no modification date could be determined.
-