compareUtil

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Feb 11, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CompareContent

func CompareContent(spath, dpath string) bool

CompareContent 比较两个文件的二进制内容是否完全一致。 参数:

spath: 源文件路径
dpath: 目标文件路径

返回值:

bool: 如果文件内容完全一致,返回 true;否则返回 false。

func CompareDate

func CompareDate(spath, dpath string) bool

CompareDate 比较两个文件的修改时间,返回源文件是否比目标文件更新。 参数:

spath: 源文件路径
dpath: 目标文件路径

返回值:

bool: 如果源文件比目标文件新,返回 true;否则返回 false。

func CompareSize

func CompareSize(spath, dpath string) bool

CompareSize 比较两个文件的大小是否相等。 参数:

spath: 源文件路径
dpath: 目标文件路径

返回值:

bool: 如果文件大小相等,返回 true;否则返回 false。

Types

This section is empty.

Jump to

Keyboard shortcuts

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