cmp

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: May 17, 2021 License: BSD-3-Clause Imports: 9 Imported by: 0

Documentation

Overview

Package cmp provides file- and tree-comparison routines.

It is a sub-package to copy's test suite.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsEqualDir

func IsEqualDir(opt copy.Options, src, dst string) error

IsEqualDir compares the contents of two directories. What to do with symlinks is configured by opt.

func IsEqualFile

func IsEqualFile(opt copy.Options, file1, file2 string) error

IsSameFile compares two files by byte contents. What to do with symlinks is configured by opt.

func IsEqualSymlink(link1, link2 string, lInfo1, lInfo2 os.FileInfo) error

IsEqualSymlink checks if two symlinks have the same name and target.

func IsSameFile

func IsSameFile(opt copy.Options, file1, file2 string) (bool, error)

IsSameFile returns true if file1 and file2 are the same file as determined by os.SameFile. This will work with directories as well. What to do with symlinks is configured by opt.

Types

This section is empty.

Jump to

Keyboard shortcuts

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