MCPcopy
hub / github.com/cortexlabs/cortex / ReadFile

Function ReadFile

pkg/lib/files/files.go:94–101  ·  view source on GitHub ↗
(path string)

Source from the content-addressed store, hash-verified

92}
93
94func ReadFile(path string) (string, error) {
95 fileBytes, err := ReadFileBytes(path)
96 if err != nil {
97 return "", err
98 }
99
100 return string(fileBytes), nil
101}
102
103func ReadFileBytes(path string) ([]byte, error) {
104 return ReadFileBytesErrPath(path, path)

Callers 15

Float64PtrFromFileFunction · 0.92
BoolFromFileFunction · 0.92
Float32PtrFromFileFunction · 0.92
Int64FromFileFunction · 0.92
Float64FromFileFunction · 0.92
IntFromFileFunction · 0.92
Int32PtrFromFileFunction · 0.92
IntPtrFromFileFunction · 0.92
StringPtrFromFileFunction · 0.92
StringFromFileFunction · 0.92
Float32FromFileFunction · 0.92
Int32FromFileFunction · 0.92

Calls 1

ReadFileBytesFunction · 0.85

Tested by

no test coverage detected