directory

package
v1.59.1 Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2025 License: Apache-2.0 Imports: 5 Imported by: 4 modules, 9 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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