MCPcopy Create free account
hub / github.com/akyoto/q / WriteFile

Function WriteFile

src/linker/WriteFile.go:10–19  ·  view source on GitHub ↗

WriteFile writes an executable file to disk.

(executable string, env *core.Environment)

Source from the content-addressed store, hash-verified

8
9// WriteFile writes an executable file to disk.
10func WriteFile(executable string, env *core.Environment) error {
11 file, err := os.OpenFile(executable, os.O_WRONLY|os.O_CREATE|os.O_TRUNC, 0o755)
12
13 if err != nil {
14 return err
15 }
16
17 Write(file, env)
18 return file.Close()
19}

Callers 2

buildFunction · 0.92
RunBuildMethod · 0.92

Calls 1

WriteFunction · 0.70

Tested by 1

RunBuildMethod · 0.74