Documentation
¶
Index ¶
- Variables
- func BytesToGigaBytes(in uint64) float64
- func BytesToMegaBytes(in uint64) float64
- func Expired(path string, regex string, nowTime time.Time, maxTime time.Duration) ([]os.FileInfo, error)
- func List(path string, regex string) ([]os.FileInfo, error)
- func RegexBeginsWith(val string) string
- func RegexEndsWith(val string) string
- func Size(path string, regex string) (uint64, error)
- type AscendingTime
- type AscendingTimeName
- type DescendingTime
- type DescendingTimeName
Constants ¶
This section is empty.
Variables ¶
View Source
var FilenameTimestampRegex *regexp.Regexp
FilenameTimestampRegex regular expression for timestamps in filenames
Functions ¶
func BytesToGigaBytes ¶
BytesToGigaBytes converts Bytes to GigaBytes
func BytesToMegaBytes ¶
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 RegexBeginsWith ¶
RegexBeginsWith returns the string regex
Types ¶
type AscendingTime ¶
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 AscendingTimeName ¶ added in v1.16.0
type AscendingTimeName []string
AscendingTimeName sorting string by timestamp in name
func (AscendingTimeName) Len ¶ added in v1.16.0
func (a AscendingTimeName) Len() int
func (AscendingTimeName) Less ¶ added in v1.16.0
func (a AscendingTimeName) Less(i, j int) bool
func (AscendingTimeName) Swap ¶ added in v1.16.0
func (a AscendingTimeName) Swap(i, j int)
type DescendingTime ¶
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)
type DescendingTimeName ¶ added in v1.16.0
type DescendingTimeName []string
DescendingTimeName sorting string by timestamp in name
func (DescendingTimeName) Len ¶ added in v1.16.0
func (a DescendingTimeName) Len() int
func (DescendingTimeName) Less ¶ added in v1.16.0
func (a DescendingTimeName) Less(i, j int) bool
func (DescendingTimeName) Swap ¶ added in v1.16.0
func (a DescendingTimeName) Swap(i, j int)
Click to show internal directories.
Click to hide internal directories.