Class FileInfo
java.lang.Object
com.jedox.etl.components.scriptapi.FileInfo
Handle to access information about a file or directory referenced by a file-based connection.
-
Method Summary
Modifier and TypeMethodDescriptionbooleanexists()Tests whether the file or directory referenced by thisFileInfoexists.Deprecated.getName()Returns the name of the file or directory referenced by thisFileInfo.getPath()Returns the path of the file or directory referenced by thisFileInfo.longgetSize()Returns the size of the file or directory referenced by thisFileInfo.booleanTests whether the file referenced by thisFileInfois a directory.booleanisFile()Tests whether the file referenced by thisFileInfois a normal file.longReturns the time that the file or directory referenced by thisFileInfowas last modified.
-
Method Details
-
exists
public boolean exists()Tests whether the file or directory referenced by thisFileInfoexists.- Returns:
trueif the file or directory exists,falseotherwise
-
isFile
public boolean isFile()Tests whether the file referenced by thisFileInfois a normal file.- Returns:
trueif the file exists and is a normal file,falseotherwise
-
isDirectory
public boolean isDirectory()Tests whether the file referenced by thisFileInfois a directory.- Returns:
trueif the file exists and is a directory,falseotherwise
-
getName
Returns the name of the file or directory referenced by thisFileInfo.- Returns:
- the name of the file or directory
-
getAbsolutePath
Deprecated.This method is deprecated and will be removed in an upcoming release, usegetPath()instead.Returns the absolute path of the file or directory referenced by thisFileInfo.- Returns:
- the absolute path of the file or directory, including it's name
-
getPath
Returns the path of the file or directory referenced by thisFileInfo.- 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 thisFileInfowas last modified.- Returns:
- a
longvalue representing the time the file or directory was last modified, measured in milliseconds since the epoch (00:00:00 GMT, January 1, 1970), or0Lif 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 thisFileInfo.- Returns:
- the size of the file in bytes,
0if the file is a directory
-
getPath()instead.