MCPcopy
hub / github.com/containerd/containerd / getOverlayPath

Function getOverlayPath

core/diff/apply/apply_linux.go:75–91  ·  view source on GitHub ↗
(options []string)

Source from the content-addressed store, hash-verified

73}
74
75func getOverlayPath(options []string) (upper string, lower []string, err error) {
76 const upperdirPrefix = "upperdir="
77 const lowerdirPrefix = "lowerdir="
78
79 for _, o := range options {
80 if after, ok := strings.CutPrefix(o, upperdirPrefix); ok {
81 upper = after
82 } else if after, ok := strings.CutPrefix(o, lowerdirPrefix); ok {
83 lower = strings.Split(after, ":")
84 }
85 }
86 if upper == "" {
87 return "", nil, fmt.Errorf("upperdir not found: %w", errdefs.ErrInvalidArgument)
88 }
89
90 return
91}
92
93func doSyncFs(file string) error {
94 fd, err := os.Open(file)

Callers 2

TestGetOverlayPathFunction · 0.85
applyFunction · 0.85

Calls

no outgoing calls

Tested by 1

TestGetOverlayPathFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…