fs

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2024 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) (string, int64, error)

CalSha256AndSize calculates the sha256 hash and size of the file at the given path.

func GenerateFiles

func GenerateFiles(root string, isRecursive, includeHidden bool) <-chan string

GenerateFiles generates a channel of file paths in the given directory. It will walk through the directory and return the absolute path of each file. Note that if root is a file, it will return the file itself.

If isRecursive is true, it will walk through all subdirectories. Otherwise, it will only walk through the top level directory.

If includeHidden is true, it will include hidden files (files starting with a dot). Otherwise, it will skip hidden files.

Types

This section is empty.

Jump to

Keyboard shortcuts

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