Class: StatObject

FTP.StatObject

new StatObject(stat)

Creates a new file stat object similar to Node's fs.stat method.
Parameters:
Name Type Description
stat string The stat string of the file or directory i.e.
"drwxr-xr-x 2 userfoo groupbar 4096 Jun 12:43 filename"
Source:

Members

(static) values :object

Holds the relative number values for parsing permissions with StatObject.parsePermissions
Type:
  • object
Source:

Methods

(static) create(stat) → {object}

Create and return a new StatObject instance
Parameters:
Name Type Description
stat string The stat string of the file or directory.
Source:
Returns:
StatObject - New StatObject
Type
object

(static) parsePermissions(permissionString) → {number}

Parses a permission string into it's relative number value
Parameters:
Name Type Description
permissionString string The string of permissions i.e. "drwxrwxrwx"
Source:
Returns:
permissions - The number value of the given permissionString
Type
number