ContainerStatPath stats the filesystem resource at the specified path in the container identified by the given name.
(name string, path string)
| 12 | // ContainerStatPath stats the filesystem resource at the specified path in the |
| 13 | // container identified by the given name. |
| 14 | func (daemon *Daemon) ContainerStatPath(name string, path string) (*container.PathStat, error) { |
| 15 | ctr, err := daemon.GetContainer(name) |
| 16 | if err != nil { |
| 17 | return nil, err |
| 18 | } |
| 19 | |
| 20 | stat, err := daemon.containerStatPath(ctr, path) |
| 21 | if err != nil { |
| 22 | if os.IsNotExist(err) { |
| 23 | return nil, containerFileNotFound{path, name} |
| 24 | } |
| 25 | // TODO(thaJeztah): check if daemon.containerStatPath returns any errors that are not typed; if not, then return as-is |
| 26 | if cerrdefs.IsInvalidArgument(err) { |
| 27 | return nil, err |
| 28 | } |
| 29 | return nil, errdefs.System(err) |
| 30 | } |
| 31 | return stat, nil |
| 32 | } |
| 33 | |
| 34 | // ContainerArchivePath creates an archive of the filesystem resource at the |
| 35 | // specified path in the container identified by the given name. Returns a |
nothing calls this directly
no test coverage detected