change

package
Version: v0.1.1 Latest Latest
Warning

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

Go to latest
Published: May 20, 2020 License: BSD-3-Clause Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckFileMode

func CheckFileMode(path string, expectedMode os.FileMode) (bool, error)

CheckFileMode checks if path has it's mode bits set to expectedMode.

func EnsureFileMode

func EnsureFileMode(path string, mode os.FileMode) (bool, error)

EnsureFileMode ensures that path has mode. It returns true if the mode bits were updated, false otherwise.

func EqualFileMode

func EqualFileMode(f1, f2 string) (bool, error)

EqualFileMode checks if f1 and f2 have the same mode bits set. If either f1 or f2 does not exist or failed to LStat, an error is returned.

func FileChecksum

func FileChecksum(path string) (string, error)

FileChecksum computes the a non-cryptographic hash (currently a Murmur3) suitable to compare files.

func FileUpdateNeeded

func FileUpdateNeeded(ref, target string) (bool, error)

FileUpdateNeeded checks if target needs to be updated to match ref. Target may not yet exist in which case true is returned without an error. If target exists, both files are compared using their checksum (see FileChecksum). FileUpdateNeeded returns an error if ref does not exist.

Types

This section is empty.

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL