title: “FILE::DIR” date: 2024-09-12 author: “laplante@plcb.ca” version: “1.0.0”
FILE::DIR — Returns an array containing the list of entries in a directory.
This function returns an array containing the list of entries in a directory.
Each entry is represented as a map with the following keys (unless the keys
parameter is specified):
{
"Atime": "2024-08-16 12:17:33.911805761 -0400 EDT",
"Ctime": "2024-08-16 12:17:15.214152534 -0400 EDT",
"IsCharDevice": false,
"IsDevice": false,
"IsDir": false,
"IsIrregular": false,
"IsNamedPipe": true,
"IsRegular": false,
"IsSetgid": false,
"IsSetuid": false,
"IsSocket": false,
"IsSticky": false,
"IsSymlink": false,
"Mtime": "2024-08-16 12:17:15.214152534 -0400 EDT",
"Name": "06A12886-C4A4-4C57-92BD-126EC11F2CA5_IN",
"Perm": 438,
"Size": 0
}
func s(a, b) {
return a.Name < b.Name;
}
func f(arg) {
return ! arg.IsDir;
}
func f(arg) {
return ! arg.IsDir;
}
func s(a, b) {
return a.Name < b.Name;
}
x := dir(filter: f, sort: s, keys: ["Name","Atime"]);