MCPcopy Create free account
hub / github.com/VKCOM/nocc / MkdirForFile

Function MkdirForFile

internal/common/filesystem.go:11–16  ·  view source on GitHub ↗
(fileName string)

Source from the content-addressed store, hash-verified

9)
10
11func MkdirForFile(fileName string) error {
12 if err := os.MkdirAll(filepath.Dir(fileName), os.ModePerm); err != nil {
13 return err
14 }
15 return nil
16}
17
18func OpenTempFile(fullPath string) (f *os.File, err error) {
19 fileNameTmp := fullPath + "." + strconv.Itoa(rand.Int())

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected