java.lang.Object
com.aquima.interactions.foundation.io.resource.FileInfo
All Implemented Interfaces:
IResourceInfo, Serializable

public class FileInfo extends Object implements IResourceInfo
This class holds the resource information of a file resource.
Since:
6.0
Author:
O. Kerpershoek
See Also:
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    FileInfo(File file)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    This method can be used to determine if the resource is available.
    protected File
     
    This method returns the name of the resource.
    This method returns a Uniform Resource Identifier object for the resource.
    boolean
    This method returns a boolean indicating if the resource represents a file.
    boolean
    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.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • FileInfo

      protected FileInfo(File file)
  • Method Details

    • getFile

      protected File 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 interface IResourceInfo
      Returns:
      boolean indicating if the resource is available.
    • getName

      public String getName()
      Description copied from interface: IResourceInfo
      This method returns the name of the resource.
      Specified by:
      getName in interface IResourceInfo
      Returns:
      the name of the resource.
    • getURI

      public URI getURI()
      Description copied from interface: IResourceInfo
      This method returns a Uniform Resource Identifier object for the resource.
      Specified by:
      getURI in interface IResourceInfo
      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 interface IResourceInfo
      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 interface IResourceInfo
      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 interface IResourceInfo
      Returns:
      boolean indicating if the resource is read-only.
    • lastModified

      public DateValue lastModified()
      Description copied from interface: IResourceInfo
      This method returns the last modification date value for the resource.
      Specified by:
      lastModified in interface IResourceInfo
      Returns:
      The last modification date, will return DateValue.UNKNOWN when no modification date could be determined.