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

      public String getAbsolutePath()
      Returns the absolute path of the file or directory referenced by this FileInfo.
      Returns:
      the absolute path of the file or directory if the location type is FileSystem, if the location type is FTP or SFTP, the path of the parent directory (the path excluding the name of the file or directory)
    • 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