MCPcopy Create free account
hub / github.com/containerd/nerdctl / Dir

Method Dir

mod/tigron/test/data.go:155–168  ·  view source on GitHub ↗
(key ...string)

Source from the content-addressed store, hash-verified

153}
154
155func (tp *temp) Dir(key ...string) string {
156 tp.t.Helper()
157
158 pth := filepath.Join(append([]string{tp.tempDir}, key...)...)
159 err := os.MkdirAll(pth, DirPermissionsDefault)
160
161 assertive.ErrorIsNil(
162 assertive.WithSilentSuccess(tp.t),
163 err,
164 fmt.Sprintf("Creating directory %q must succeed", pth),
165 )
166
167 return pth
168}
169
170func (tp *temp) Path(key ...string) string {
171 tp.t.Helper()

Callers 2

SaveMethod · 0.95
SaveToWriterMethod · 0.95

Calls 1

HelperMethod · 0.65

Tested by

no test coverage detected