MCPcopy Create free account
hub / github.com/cli/cli / MkdirAll

Method MkdirAll

internal/safepaths/root.go:142–155  ·  view source on GitHub ↗

MkdirAll creates a directory path without traversing symbolic links.

(name string, perm os.FileMode)

Source from the content-addressed store, hash-verified

140
141// MkdirAll creates a directory path without traversing symbolic links.
142func (r *Root) MkdirAll(name string, perm os.FileMode) error {
143 local, err := r.localPath(name)
144 if err != nil {
145 return err
146 }
147 if local == "." {
148 return nil
149 }
150 root, err := r.openDirectories(local, perm)
151 if err != nil {
152 return err
153 }
154 return root.Close()
155}
156
157// Validate checks name using the same lexical rules as [ValidateChild].
158func (r *Root) Validate(name string) error {

Callers 15

prepareExportDirFunction · 0.80
writeExportArchiveFunction · 0.80
copyConfigTreeFunction · 0.80
TestCmdSetFunction · 0.80
openStateFunction · 0.80
downloadMethod · 0.80
extractTestArchiveFunction · 0.80
TestSchemaSourceLocateFunction · 0.80
TestCmdSchemasFunction · 0.80
newScratchFunction · 0.80
ensureGitFixtureMethod · 0.80
copyGitTreeFunction · 0.80

Calls 3

localPathMethod · 0.95
openDirectoriesMethod · 0.95
CloseMethod · 0.65