fs

package
v0.5.3 Latest Latest
Warning

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

Go to latest
Published: May 14, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CanonicalPath

func CanonicalPath(p string, followSymlinks bool) (string, error)

CanonicalPath resolves to an absolute path. If followSymlinks is true, attempts to resolve symlinks.

func FastHash

func FastHash(path string) (string, int64, int64, error)

FastHash returns (hash,size,mtime)

func FileTimes

func FileTimes(path string) (int64, int64, error)

FileTimes returns size and mtime (seconds)

func IsDir

func IsDir(path string) bool

IsDir returns true if the path is a directory

func IsRegular

func IsRegular(path string) bool

IsRegular returns true if the path is a regular file

func NowSec

func NowSec() int64

NowSec returns current epoch seconds

func SigString

func SigString(s FileSig) string

Types

type FileSig

type FileSig struct {
	Dev uint64
	Ino uint64
}

func StatSig

func StatSig(path string) (FileSig, error)

type Ignore

type Ignore struct {
	// contains filtered or unexported fields
}

Simple ignore matcher with defaults + optional .compairignore globs.

func DefaultIgnore

func DefaultIgnore() *Ignore

func LoadIgnore

func LoadIgnore(root string) *Ignore

func (*Ignore) ShouldIgnore

func (ig *Ignore) ShouldIgnore(path string, isDir bool) bool

Jump to

Keyboard shortcuts

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