filesystem

package
v0.0.0-...-2e1bc12 Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2024 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	B  = 1
	KB = 1024 * B
	MB = 1024 * KB
	GB = 1024 * MB
)

Variables

This section is empty.

Functions

func DirSize

func DirSize(path string) (int64, error)

DirSize returns the total size for a directory in bytes by recursively iterating on files.

func FileSize

func FileSize(path string) (int64, error)

FileSize returns the size for a single file in bytes.

func ListFiles

func ListFiles(path string) ([]string, error)

ListFiles lists all files present in a directory recursively.

Types

This section is empty.

Jump to

Keyboard shortcuts

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