Item Stats
Retrieves statistics for a given file or directory path.
This node checks for the existence of a file or directory and returns its properties.
Outputs Explained#
-
size: The size is given in bytes. Note that for directories, the reported size is for the directory's metadata, not the total size of its contents. This value can vary between operating systems. -
permissions: The permissions are returned as a standard three-digit number, common in Unix-like systems. For example, an octal permission0o755will be output as the number755.
| Digit | Meaning | rwx |
|---|---|---|
7 |
read, write, exec | 111 |
6 |
read, write | 110 |
5 |
read, exec | 101 |
4 |
read only | 100 |
2 |
write only | 010 |
1 |
exec only | 001 |
0 |
no permission | 000 |
The three digits represent permissions for User, Group, and Other, respectively.
Inputs#
| Port | Description |
|---|---|
| Executes the node. | |
| The path to the file or directory. |
Outputs#
| Port | Description |
|---|---|
| Executed if the item exists. | |
| Executed if the item does not exist. | |
| True if the file or directory exists. | |
| True if the path points to a directory. | |
| True if the path points to a regular file. | |
| The size of the item in bytes. | |
| File permissions as a decimal representation of an octal number (e.g., 755). |
ID: core/item-stats@v1