Skip to content

Commit 3a3bb1c

Browse files
committed
pkg/directory: deprecate, and move to internal
Signed-off-by: Sebastiaan van Stijn <[email protected]>
1 parent 80900bd commit 3a3bb1c

9 files changed

Lines changed: 18 additions & 4 deletions

File tree

daemon/graphdriver/fuse-overlayfs/fuseoverlayfs.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ import (
1818
"github.com/docker/docker/daemon/graphdriver"
1919
"github.com/docker/docker/daemon/graphdriver/overlayutils"
2020
"github.com/docker/docker/internal/containerfs"
21+
"github.com/docker/docker/internal/directory"
2122
"github.com/docker/docker/pkg/archive"
2223
"github.com/docker/docker/pkg/chrootarchive"
23-
"github.com/docker/docker/pkg/directory"
2424
"github.com/docker/docker/pkg/idtools"
2525
"github.com/docker/docker/pkg/parsers/kernel"
2626
"github.com/moby/locker"

daemon/graphdriver/overlay2/overlay.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ import (
2020
"github.com/docker/docker/daemon/graphdriver"
2121
"github.com/docker/docker/daemon/graphdriver/overlayutils"
2222
"github.com/docker/docker/internal/containerfs"
23+
"github.com/docker/docker/internal/directory"
2324
"github.com/docker/docker/pkg/archive"
2425
"github.com/docker/docker/pkg/chrootarchive"
25-
"github.com/docker/docker/pkg/directory"
2626
"github.com/docker/docker/pkg/idtools"
2727
"github.com/docker/docker/pkg/ioutils"
2828
"github.com/docker/docker/pkg/parsers"
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
package directory
2+
3+
import (
4+
"context"
5+
6+
"github.com/docker/docker/internal/directory"
7+
)
8+
9+
// Size walks a directory tree and returns its total size in bytes.
10+
//
11+
// Deprecated: this function is only used internally, and will be removed in the next release.
12+
func Size(ctx context.Context, dir string) (int64, error) {
13+
return directory.Size(ctx, dir)
14+
}

volume/service/convert.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import (
1010
"github.com/docker/docker/api/types/filters"
1111
volumetypes "github.com/docker/docker/api/types/volume"
1212
"github.com/docker/docker/errdefs"
13-
"github.com/docker/docker/pkg/directory"
13+
"github.com/docker/docker/internal/directory"
1414
"github.com/docker/docker/volume"
1515
)
1616

volume/service/service.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import (
1010
"github.com/docker/docker/api/types/filters"
1111
volumetypes "github.com/docker/docker/api/types/volume"
1212
"github.com/docker/docker/errdefs"
13-
"github.com/docker/docker/pkg/directory"
13+
"github.com/docker/docker/internal/directory"
1414
"github.com/docker/docker/pkg/idtools"
1515
"github.com/docker/docker/pkg/plugingetter"
1616
"github.com/docker/docker/pkg/stringid"

0 commit comments

Comments
 (0)