MCPcopy Create free account
hub / github.com/OpenListTeam/OpenList / CreateNestedFile

Function CreateNestedFile

pkg/utils/file.go:107–113  ·  view source on GitHub ↗

CreateNestedFile create nested file

(path string)

Source from the content-addressed store, hash-verified

105
106// CreateNestedFile create nested file
107func CreateNestedFile(path string) (*os.File, error) {
108 basePath := filepath.Dir(path)
109 if err := CreateNestedDirectory(basePath); err != nil {
110 return nil, err
111 }
112 return os.Create(path)
113}
114
115// CreateTempFile create temp file from io.ReadCloser, and seek to 0
116func CreateTempFile(r io.Reader, size int64) (*os.File, error) {

Callers 3

generateStrmFunction · 0.92
InitConfigFunction · 0.92
CopyFileFunction · 0.85

Calls 2

CreateNestedDirectoryFunction · 0.85
CreateMethod · 0.65

Tested by

no test coverage detected