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

Method Sub

internal/safepaths/root.go:121–139  ·  view source on GitHub ↗

Sub creates and opens a rooted subdirectory.

(name string, perm os.FileMode)

Source from the content-addressed store, hash-verified

119
120// Sub creates and opens a rooted subdirectory.
121func (r *Root) Sub(name string, perm os.FileMode) (*Root, error) {
122 local, err := r.localPath(name)
123 if err != nil {
124 return nil, err
125 }
126 root, err := r.openDirectories(local, perm)
127 if err != nil {
128 return nil, err
129 }
130
131 return &Root{
132 root: root,
133 openRoot: r.openRoot,
134 openFile: r.openFile,
135 lstat: r.lstat,
136 readlink: r.readlink,
137 stat: r.stat,
138 }, nil
139}
140
141// MkdirAll creates a directory path without traversing symbolic links.
142func (r *Root) MkdirAll(name string, perm os.FileMode) error {

Callers 11

printSessionFunction · 0.80
RenderJobsFunction · 0.80
RenderJobsCompactFunction · 0.80
DurationMethod · 0.80
preciseAgoFunction · 0.80
runDownloadFunction · 0.80
addRowFunction · 0.80
contentFunction · 0.80
CheckForExtensionUpdateFunction · 0.80
FuzzyAgoAbbrFunction · 0.80

Calls 2

localPathMethod · 0.95
openDirectoriesMethod · 0.95

Tested by 1