1 | -- Abstract representation of a 'find' expression.
|
2 |
|
3 | module find
|
4 | {
|
5 | expr =
|
6 | Concatenation(expr* exprs)
|
7 | | Disjunction(expr* exprs)
|
8 | | Conjunction(expr* exprs)
|
9 | | Negation(expr expr)
|
10 |
|
11 | | True_
|
12 | | False_
|
13 |
|
14 | | PathTest(pathAccessor a, predicate p)
|
15 | | StatTest(statAccessor a, predicate p)
|
16 |
|
17 | | DeleteAction
|
18 | | PruneAction
|
19 | | QuitAction
|
20 | | PrintAction(string? file, string? format)
|
21 | | LsAction(string? file)
|
22 | | ExecAction(bool batch, bool dir, bool ok, string* argv)
|
23 |
|
24 | pathAccessor =
|
25 | FullPath
|
26 | | Filename
|
27 |
|
28 | statAccessor =
|
29 | AccessTime
|
30 | | CreationTime
|
31 | | ModificationTime
|
32 | | Filesystem
|
33 | | Inode
|
34 | | LinkCount
|
35 | | Mode
|
36 | | Filetype
|
37 | | Uid
|
38 | | Gid
|
39 | | Username
|
40 | | Groupname
|
41 | | Size
|
42 |
|
43 | predicate =
|
44 | EQ(int n)
|
45 | | GE(int n)
|
46 | | LE(int n)
|
47 | | StringMatch(string str, bool ignoreCase)
|
48 | | GlobMatch(string glob, bool ignoreCase)
|
49 | | RegexMatch(string re, bool ignoreCase)
|
50 | | Readable
|
51 | | Writable
|
52 | | Executable
|
53 | }
|