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

TestFindNonLegacyFunction · 0.80
TestFindLegacyFunction · 0.80
GenerateSSHKeyMethod · 0.80
TestRemoveCopilotFunction · 0.80
downloadCopilotFunction · 0.80
updateSkillInPlaceFunction · 0.80
TestScanInstalledSkillsFunction · 0.80
TestUpdateRunFunction · 0.80

Calls 3

localPathMethod · 0.95
openDirectoriesMethod · 0.95
CloseMethod · 0.65

Tested by 15

TestFindNonLegacyFunction · 0.64
TestFindLegacyFunction · 0.64
TestRemoveCopilotFunction · 0.64
TestScanInstalledSkillsFunction · 0.64
TestUpdateRunFunction · 0.64
TestListRunFunction · 0.64
writeSkillFunction · 0.64
writeLocalTestSkillFunction · 0.64