package directory

import "github.com/containers/storage/pkg/directory"

Index

Functions

func MoveToSubdir

func MoveToSubdir(oldpath, subdir string) error

MoveToSubdir moves all contents of a directory to a subdirectory underneath the original path

func Size

func Size(dir string) (size int64, err error)

Size walks a directory tree and returns its total size in bytes.

Types

type DiskUsage

type DiskUsage struct {
	Size       int64
	InodeCount int64
}

DiskUsage is a structure that describes the disk usage (size and inode count) of a particular directory.

func Usage

func Usage(dir string) (usage *DiskUsage, err error)

Usage walks a directory tree and returns its total size in bytes and the number of inodes.

Source Files

directory.go directory_unix.go

Version
v1.59.0 (latest)
Published
Jul 14, 2025
Platform
linux/amd64
Imports
5 packages
Last checked
19 hours ago

Tools for package owners.