github.com/solo-io/cue@v0.4.7/pkg/tool/file/doc.go (about) 1 // Code generated by cue get go. DO NOT EDIT. 2 3 // Package file provides file operations for cue tasks. 4 // 5 // These are the supported tasks: 6 // 7 // // Read reads the contents of a file. 8 // Read: { 9 // $id: "tool/file.Read" 10 // 11 // // filename names the file to read. 12 // // 13 // // Relative names are taken relative to the current working directory. 14 // // Slashes are converted to the native OS path separator. 15 // filename: !="" 16 // 17 // // contents is the read contents. If the contents are constraint to bytes 18 // // (the default), the file is read as is. If it is constraint to a string, 19 // // the contents are checked to be valid UTF-8. 20 // contents: *bytes | string 21 // } 22 // 23 // // Append writes contents to the given file. 24 // Append: { 25 // $id: "tool/file.Append" 26 // 27 // // filename names the file to append. 28 // // 29 // // Relative names are taken relative to the current working directory. 30 // // Slashes are converted to the native OS path separator. 31 // filename: !="" 32 // 33 // // permissions defines the permissions to use if the file does not yet exist. 34 // permissions: int | *0o666 35 // 36 // // contents specifies the bytes to be written. 37 // contents: bytes | string 38 // } 39 // 40 // // Create writes contents to the given file. 41 // Create: { 42 // $id: "tool/file.Create" 43 // 44 // // filename names the file to write. 45 // // 46 // // Relative names are taken relative to the current working directory. 47 // // Slashes are converted to the native OS path separator. 48 // filename: !="" 49 // 50 // // permissions defines the permissions to use if the file does not yet exist. 51 // permissions: int | *0o666 52 // 53 // // contents specifies the bytes to be written. 54 // contents: bytes | string 55 // } 56 // 57 // // Glob returns a list of files. 58 // Glob: { 59 // $id: "tool/file.Glob" 60 // 61 // // glob specifies the pattern to match files with. 62 // // 63 // // A relative pattern is taken relative to the current working directory. 64 // // Slashes are converted to the native OS path separator. 65 // glob: !="" 66 // files: [...string] 67 // } 68 // 69 package file