boolean
true if the file exists, false if it doesn’t
string matching "file"
Indicates that this is a file resource
string
Absolute path of file
string
Name of the group owning the file
string
Name of the user owning the file
integer
Octal permission bits for the file, e.g. 0755. Since it’s an integer you will need to convert to octal if you want it in that format.
string
SHA1 hash of the file’s contents as a hexadecimal string
['integer', 'long']
Current file size in bytes
JSON Schema:
{
"type": "object",
"properties": {
"kind": {
"pattern": "file",
"required": true,
"type": "string",
"description": "Indicates that this is a file resource"
},
"group": {
"type": "string",
"description": "Name of the group owning the file"
},
"name": {
"required": true,
"type": "string",
"description": "Absolute path of file"
},
"exists": {
"required": true,
"type": "boolean",
"description": "``true`` if the file exists, ``false`` if it doesn't"
},
"sha": {
"type": "string",
"description": "SHA1 hash of the file's contents as a hexadecimal string"
},
"owner": {
"type": "string",
"description": "Name of the user owning the file"
},
"permissions": {
"type": "integer",
"description": "Octal permission bits for the file, e.g. ``0755``. Since it's an integer you will need to convert to octal if you want it in that format."
},
"size": {
"type": [
"integer",
"long"
],
"description": "Current file size in bytes"
}
}
}