Class FTPFileInfo

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.

Deprecated:

The FTPClient is deprecated. Use SFTPClient for a secure alternative.

PropertyDescription
directory: Boolean (read-only)Identifies if the file is a directory.
name: String (read-only)Returns the name of the file.
size: Number (read-only)Returns the size of the file.
timestamp: Date (read-only)Returns the timestamp of the file.
ConstructorDescription
FTPFileInfo(String, Number, Boolean, Date)Constructs the FTPFileInfo instance.
MethodDescription
getDirectory()Identifies if the file is a directory.
getName()Returns the name of the file.
getSize()Returns the size of the file.
getTimestamp()Returns the timestamp of the file.

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

directory: Boolean (read-only)

Identifies if the file is a directory.


name: String (read-only)

Returns the name of the file.


size: Number (read-only)

Returns the size of the file.


timestamp: Date (read-only)

Returns the timestamp of the file.


FTPFileInfo(name: String, size: Number, directory: Boolean, timestamp: Date)

Constructs the FTPFileInfo instance.

Parameters:

  • name - the name of the file.
  • size - the size of the file.
  • directory - controls if the file is a directory.
  • timestamp - the timestamp of the file.

getDirectory(): Boolean

Identifies if the file is a directory.

Returns:

  • true if the file is a directory, false otherwise.

getName(): String

Returns the name of the file.

Returns:

  • the name of the file.

getSize(): Number

Returns the size of the file.

Returns:

  • the size of the file.

getTimestamp(): Date

Returns the timestamp of the file.

Returns:

  • the timestamp of the file.