[27.1] pkg/containerfs: deprecate, and add temporary aliases

There's no (known) external consumers of this, but let's add a
deprecation for the 27.1 release.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn
2024-07-18 23:22:47 +02:00
parent 31c1b7dc17
commit d1ea2b1fec

View File

@@ -0,0 +1,22 @@
package containerfs
import (
"path/filepath"
"github.com/docker/docker/internal/containerfs"
)
// Deprecated: will be removed in the next release.
func CleanScopedPath(path string) string {
if len(path) >= 2 {
if v := filepath.VolumeName(path); len(v) > 0 {
path = path[len(v):]
}
}
return filepath.Join(string(filepath.Separator), path)
}
// Deprecated: will be removed in the next release.
func EnsureRemoveAll(dir string) error {
return containerfs.EnsureRemoveAll(dir)
}