Class FileInfo

java.lang.Object
com.jedox.etl.components.scriptapi.FileInfo

public class FileInfo extends Object
Handle to access information about a file or directory referenced by a file-based connection.
  • Method Details

    • exists

      public boolean exists()
      Tests whether the file or directory referenced by this FileInfo exists.
      Returns:
      true if the file or directory exists, false otherwise
    • isFile

      public boolean isFile()
      Tests whether the file referenced by this FileInfo is a normal file.
      Returns:
      true if the file exists and is a normal file, false otherwise
    • isDirectory

      public boolean isDirectory()
      Tests whether the file referenced by this FileInfo is a directory.
      Returns:
      true if the file exists and is a directory, false otherwise
    • getName

      public String getName()
      Returns the name of the file or directory referenced by this FileInfo.
      Returns:
      the name of the file or directory
    • getAbsolutePath

      @Deprecated public String getAbsolutePath()
      Deprecated.
      This method is deprecated and will be removed in an upcoming release, use getPath() instead.
      Returns the absolute path of the file or directory referenced by this FileInfo.
      Returns:
      the absolute path of the file or directory, including it's name
    • getPath

      public String getPath()
      Returns the path of the file or directory referenced by this FileInfo.
      Returns:
      the path of the file or directory, including it's name
    • lastModified

      public long lastModified()
      Returns the time that the file or directory referenced by this FileInfo was last modified.
      Returns:
      a long value representing the time the file or directory was last modified, measured in milliseconds since the epoch (00:00:00 GMT, January 1, 1970), or 0L if the file or directory does not exist or if an error occurred
    • getSize

      public long getSize()
      Returns the size of the file or directory referenced by this FileInfo.
      Returns:
      the size of the file in bytes, 0 if the file is a directory