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 TypeMethodDescriptionboolean
exists()
Tests whether the file or directory referenced by thisFileInfo
exists.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
.long
getSize()
Returns the size of the file or directory referenced by thisFileInfo
.boolean
Tests whether the file referenced by thisFileInfo
is a directory.boolean
isFile()
Tests whether the file referenced by thisFileInfo
is a normal file.long
Returns the time that the file or directory referenced by thisFileInfo
was last modified.
-
Method Details
-
exists
public boolean exists()Tests whether the file or directory referenced by thisFileInfo
exists.- Returns:
true
if the file or directory exists,false
otherwise
-
isFile
public boolean isFile()Tests whether the file referenced by thisFileInfo
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 thisFileInfo
is a directory.- Returns:
true
if the file exists and is a directory,false
otherwise
-
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 thisFileInfo
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), or0L
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 thisFileInfo
.- Returns:
- the size of the file in bytes,
0
if the file is a directory
-
getPath()
instead.