MCPcopy Create free account
hub / github.com/akash-network/node / writeFile

Function writeFile

cmd/akash/cmd/testnet.go:397–412  ·  view source on GitHub ↗
(name string, dir string, contents []byte)

Source from the content-addressed store, hash-verified

395}
396
397func writeFile(name string, dir string, contents []byte) error {
398 writePath := dir
399 file := filepath.Join(writePath, name)
400
401 err := tmos.EnsureDir(writePath, 0o755)
402 if err != nil {
403 return err
404 }
405
406 err = tmos.WriteFile(file, contents, 0o644)
407 if err != nil {
408 return err
409 }
410
411 return nil
412}

Callers 1

InitTestnetFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected