fs

package
v4.10.5 Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const DirPerms = 0755
View Source
const ErrNoDirEntryFound = gas.Error("file not found in directory")

Variables

This section is empty.

Functions

func CopyDirectoryPreservingTimestamp added in v4.10.0

func CopyDirectoryPreservingTimestamp(source, dest string) error

CopyDirectoryPreservingTimestamp copies the source directory to the destination, preserving the modification and access times.

func CopyFile added in v4.10.0

func CopyFile(source, dest string) (err error)

CopyFile copies the source file to the destination, preserving the modification and access times.

func CopyPreservingTimestamp added in v4.10.0

func CopyPreservingTimestamp(source, dest string) error

CopyPreservingTimestamp copies the source to the dest, recursively, preserving the modification and access times.

func DirEntryModTime

func DirEntryModTime(de os.DirEntry) time.Time

DirEntryModTime returns the ModTime of the given DirEntry, treating errors as time 0.

func FindLatestCombinedOutput added in v4.10.2

func FindLatestCombinedOutput(dir, watchFile string) (string, error)

FindLatestCombinedOutput finds the entry in dir that contains the newest watchFile.

func FindLatestDirectoryEntry

func FindLatestDirectoryEntry(dir, suffix string) (string, error)

FindLatestDirectoryEntry finds the latest entry in dir that has the given suffix and returns its path.

func ModTime added in v4.10.0

func ModTime(path string) time.Time

ModTime returns the ModTime for the given path, treating errors as time 0.

func RemoveFromDirWhenOlderThan added in v4.10.0

func RemoveFromDirWhenOlderThan(dir string, before time.Time) error

RemoveFromDirWhenOlderThan removes all children of the given directory if their modification time is before the time specified.

func Touch added in v4.10.0

func Touch(path string, t time.Time) error

Touch updates the modtime and access time of the specified path to the specified time.

Types

This section is empty.

Jump to

Keyboard shortcuts

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