This repository has been archived on 2024-04-08. You can view files and clone it, but cannot push or open issues or pull requests.
2021-12-23 15:03:39 +01:00

84 lines
1.4 KiB
CUE

package engine
// Create one or multiple directory in a container
#Mkdir: {
$dagger: task: _name: "Mkdir"
// Container filesystem
input: #FS
// Path of the directory to create
// It can be nested (e.g : "/foo" or "/foo/bar")
path: string
// Permissions of the directory
permissions: *0o755 | int
// If set, it creates parents' directory if they do not exist
parents: *true | false
// Modified filesystem
output: #FS
}
#ReadFile: {
$dagger: task: _name: "ReadFile"
// Filesystem tree holding the file
input: #FS
// Path of the file to read
path: string
// Contents of the file
contents: string
}
// Write a file to a filesystem tree, creating it if needed
#WriteFile: {
$dagger: task: _name: "WriteFile"
// Input filesystem tree
input: #FS
// Path of the file to write
path: string
// Contents to write
contents: string
// Permissions of the file
permissions: int
// Output filesystem tree
output: #FS
}
// Produce an empty directory
#Scratch: {
$dagger: task: _name: "Scratch"
output: #FS
}
// Copy files from one FS tree to another
#Copy: {
$dagger: task: _name: "Copy"
input: #FS
#CopyInfo
output: #FS
}
#CopyInfo: {
source: {
root: #FS
path: string | *"/"
}
dest: string
}
// Merge multiple FS trees into one
#Merge: {
@dagger(notimplemented)
$dagger: task: _name: "Merge"
input: #FS
layers: [...#CopyInfo]
output: #FS
}