directory

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2021 License: GPL-3.0 Imports: 4 Imported by: 0

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

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.

Jump to

Keyboard shortcuts

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