blob: 852b73c286d05ae5b0f72a9fdb74e15e90b558c8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
#path_string: string & =~ "^/"
#file_string: #path_string & =~ "[^/]$"
#octal_string: string & =~ "^[0-7]{3,4}$"
#HjemFile: {
type!: string
source?: #path_string
target!: #path_string
clobber?: bool
permissions?: #octal_string
uid?: int & >=0
gid?: int & >=0
deactivate?: bool
} & ({
type: "copy"
// "copy" only works with individual files
source!: #file_string
target!: #file_string
...
} | {
type: "symlink"
source!: _
// disallow inapplicable fields
permissions?: _|_
uid?: _|_
gid?: _|_
...
} | {
type: "delete" | "directory" | "modify"
source?: _|_
...
})
close({
version: 2
files: [...#HjemFile]
})
|