dir

package
v1.13.0 Latest Latest
Warning

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

Go to latest
Published: May 16, 2021 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BytesToGigaBytes

func BytesToGigaBytes(in uint64) float64

BytesToGigaBytes converts Bytes to GigaBytes

func BytesToMegaBytes

func BytesToMegaBytes(in uint64) float64

BytesToMegaBytes converts Bytes to MegaBytes

func Expired

func Expired(path string, regex string, nowTime time.Time, maxTime time.Duration) ([]os.FileInfo, error)

Expired returns the files that have expired

func List

func List(path string, regex string) ([]os.FileInfo, error)

List returns the files

func RegexBeginsWith

func RegexBeginsWith(val string) string

RegexBeginsWith returns the string regex

func RegexEndsWith

func RegexEndsWith(val string) string

RegexEndsWith returns the string regex

func Size

func Size(path string, regex string) (uint64, error)

Size returns the directory size in Bytes

Types

type AscendingTime

type AscendingTime []os.FileInfo

AscendingTime sorting FileInfo by time

func (AscendingTime) Len

func (a AscendingTime) Len() int

func (AscendingTime) Less

func (a AscendingTime) Less(i, j int) bool

func (AscendingTime) Swap

func (a AscendingTime) Swap(i, j int)

type DescendingTime

type DescendingTime []os.FileInfo

DescendingTime sorting FileInfo by time

func (DescendingTime) Len

func (a DescendingTime) Len() int

func (DescendingTime) Less

func (a DescendingTime) Less(i, j int) bool

func (DescendingTime) Swap

func (a DescendingTime) Swap(i, j int)

Jump to

Keyboard shortcuts

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