filesystem

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: May 18, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrTooManySymlinks = fmt.Errorf("too many levels of symbolic links")
)

Functions

func CreateAndCopyFile

func CreateAndCopyFile(fs billy.Filesystem, src, dst string, perm os.FileMode) error

Overwrite is allowed

func EvalSymlinks(fs billy.Filesystem, path string) (string, error)

func GetRootDir

func GetRootDir() string

func IsFileContentEqual

func IsFileContentEqual(fs billy.Filesystem, a, b string) (bool, error)

Return true if file contents are equal

func NewOSFS

func NewOSFS() billy.Filesystem

What is this function doing?

dotato depends on "github.com/go-git/go-billy/v5". It provides a abstract interface for "github.com/go-git/go-billy/v5/osfs" and "github.com/go-git/go-billy/v5/memfs".

osfs.New("") occurs errors in linux filesystem when it is used with Readlink(absPath).

Types

type PathStat

type PathStat struct {
	Path   gp.GardenPath
	Target gp.GardenPath // direct target of the symlink
	Real   gp.GardenPath // final target of the chained symlinks
	IsFile bool
	Exists bool
}

func NewPathStat

func NewPathStat(fs billy.Filesystem, path gp.GardenPath) (*PathStat, error)

Jump to

Keyboard shortcuts

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