fsutil

package
v0.12.1 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2026 License: Apache-2.0, MIT Imports: 8 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DirIter added in v0.12.0

func DirIter(path string, batchSize int) iter.Seq2[os.DirEntry, error]

DirIter returns iterator over directory entries

This method of directory iteration can be especially useful for iteration over directories with large number of entries. It does not read all entries upfront working on at most `batchSize` entries at a time

func DirWritable

func DirWritable(dir string) error

DirWritable checks if a directory is writable. If the directory does not exist it is created with writable permission.

func ExpandHome added in v0.8.36

func ExpandHome(path string) (string, error)

ExpandHome expands the path to include the home directory if the path is prefixed with `~`. If it isn't prefixed with `~`, the path is returned as-is.

func FileChanged

func FileChanged(filePath string, modTime time.Time) (time.Time, bool, error)

FileChanged returns the modification time of a file and true if different from the given time.

func FileExists

func FileExists(filename string) bool

FileExists return true if the file exists

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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