MCPcopy Index your code
hub / github.com/ddev/ddev / ReadFileIntoString

Function ReadFileIntoString

pkg/fileutil/files.go:349–355  ·  view source on GitHub ↗

ReadFileIntoString gets the contents of file into string

(path string)

Source from the content-addressed store, hash-verified

347
348// ReadFileIntoString gets the contents of file into string
349func ReadFileIntoString(path string) (string, error) {
350 bytesFile, err := os.ReadFile(path)
351 if err != nil {
352 return "", err
353 }
354 return string(bytesFile), err
355}
356
357// AppendStringToFile takes a path to a file and a string to append
358// and it appends it, returning err

Callers 15

ReadProjectEnvFileFunction · 0.92
PushGlobalTraefikConfigFunction · 0.92
configureTraefikForAppFunction · 0.92
isTypo3LegacyV12OrHigherFunction · 0.92
ParseRuntimeDependenciesFunction · 0.92
GatherAllManifestsFunction · 0.92

Calls

no outgoing calls