directory

package
v1.32.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 5, 2022 License: Apache-2.0 Imports: 4 Imported by: 9

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

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 added in v0.46.1

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 added in v0.46.1

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL