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" |
Members
(static) values :object
Holds the relative number values for parsing permissions
with StatObject.parsePermissions
Type:
- object
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. |
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" |
Returns:
permissions - The number value of the given permissionString
- Type
- number