api/types: move ContainerPathStat to api/types/container

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn
2024-06-08 20:23:28 +02:00
parent db2f1acd5d
commit 47d7c9e31d
13 changed files with 63 additions and 51 deletions

View File

@@ -4,13 +4,13 @@ import (
"io"
"os"
"github.com/docker/docker/api/types"
"github.com/docker/docker/api/types/container"
"github.com/docker/docker/errdefs"
)
// ContainerStatPath stats the filesystem resource at the specified path in the
// container identified by the given name.
func (daemon *Daemon) ContainerStatPath(name string, path string) (stat *types.ContainerPathStat, err error) {
func (daemon *Daemon) ContainerStatPath(name string, path string) (stat *container.PathStat, err error) {
ctr, err := daemon.GetContainer(name)
if err != nil {
return nil, err
@@ -30,7 +30,7 @@ func (daemon *Daemon) ContainerStatPath(name string, path string) (stat *types.C
// ContainerArchivePath creates an archive of the filesystem resource at the
// specified path in the container identified by the given name. Returns a
// tar archive of the resource and whether it was a directory or a single file.
func (daemon *Daemon) ContainerArchivePath(name string, path string) (content io.ReadCloser, stat *types.ContainerPathStat, err error) {
func (daemon *Daemon) ContainerArchivePath(name string, path string) (content io.ReadCloser, stat *container.PathStat, err error) {
ctr, err := daemon.GetContainer(name)
if err != nil {
return nil, nil, err