utils

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2025 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CalSha256AndSize

func CalSha256AndSize(absPath string, sizeToRead int64) (string, int64, error)

func CheckReadPath

func CheckReadPath(path string) bool

func DeleteDir

func DeleteDir(dir string) bool

func FloatSecFromTime

func FloatSecFromTime(t time.Time) float64

FloatSecFromTime converts a time.Time instance to a floating-point timestamp in seconds.

func GetFileSize

func GetFileSize(filepath string) (int64, error)

func GetParentFolder

func GetParentFolder(path string) string

func NormalizeFloatTimestamp

func NormalizeFloatTimestamp(timestamp float64) (int64, int32)

NormalizeFloatTimestamp normalizes a floating-point timestamp to seconds and nanoseconds.

func TimeFromFloat

func TimeFromFloat(timestamp float64) time.Time

TimeFromFloat converts a floating-point timestamp to a time.Time instance.

Types

This section is empty.

Jump to

Keyboard shortcuts

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