Script: Class dw.net.SFTPFileInfo
Class SFTPFileInfo
- Object
- dw.net.SFTPFileInfo
The class is used to store information about a remote file.
Note: when this class is used with sensitive data, be careful in persisting sensitive information to disk.
Properties
directory : boolean Read Only
Identifies if the file is a directory.
modificationTime : Date Read Only
The last modification time of the file/directory.
name : String Read Only
The name of the file/directory.
size : Number Read Only
The size of the file/directory.
Constructor Summary
SFTPFileInfo(name : String, size : Number, directory : boolean, mtime : Number)
Constructs the SFTPFileInfo instance.
Method Summary
getDirectory() : boolean
Identifies if the file is a directory.
Returns the last modification time of the file/directory.
Returns the name of the file/directory.
Returns the size of the file/directory.
Methods inherited from class Object
assign, create, create, defineProperties, defineProperty, entries, freeze, fromEntries, getOwnPropertyDescriptor, getOwnPropertyNames, getOwnPropertySymbols, getPrototypeOf, hasOwnProperty, is, isExtensible, isFrozen, isPrototypeOf, isSealed, keys, preventExtensions, propertyIsEnumerable, seal, setPrototypeOf, toLocaleString, toString, valueOf, values
Constructor Detail
SFTPFileInfo
publicSFTPFileInfo(name : String, size : Number, directory : boolean, mtime : Number)
Constructs the SFTPFileInfo instance.
Parameters:
name - the name of the file.
size - the size of the file.
directory - controls if the file is a directory.
mtime - last modification time.
Method Detail
getDirectory
getDirectory() : boolean
Identifies if the file is a directory.
Returns:
true if the file is a directory, false otherwise.
getModificationTime
getModificationTime() : Date
Returns the last modification time of the file/directory.
Returns:
the last modification time.
getName
getName() : String
Returns the name of the file/directory.
Returns:
the name.
getSize
getSize() : Number
Returns the size of the file/directory.
Returns:
the size.