spiegel_podman/pkg/domain/infra/abi/containers_stat.go
Valentin Rothberg bd09b7aa79 bump go module to version 4
Automated for .go files via gomove [1]:
`gomove github.com/containers/podman/v3 github.com/containers/podman/v4`

Remaining files via vgrep [2]:
`vgrep github.com/containers/podman/v3`

[1] https://github.com/KSubedi/gomove
[2] https://github.com/vrothberg/vgrep

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2022-01-18 12:47:07 +01:00

21 lines
479 B
Go

package abi
import (
"context"
"github.com/containers/podman/v4/pkg/domain/entities"
)
func (ic *ContainerEngine) ContainerStat(ctx context.Context, nameOrID string, containerPath string) (*entities.ContainerStatReport, error) {
container, err := ic.Libpod.LookupContainer(nameOrID)
if err != nil {
return nil, err
}
info, err := container.Stat(ctx, containerPath)
if info != nil {
return &entities.ContainerStatReport{FileInfo: *info}, err
}
return nil, err
}