fsutil

package
v1.13.1 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2026 License: GPL-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package fsutil provides filesystem utilities for hardlink operations.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SameFilesystem

func SameFilesystem(path1, path2 string) (bool, error)

SameFilesystem checks if two paths are on the same filesystem. This is required for hardlinks, which cannot span filesystems. Returns true if both paths are on the same filesystem, false otherwise. Returns an error if either path doesn't exist or cannot be accessed.

Implementation is platform-specific:

  • Unix: compares device IDs from stat(2)
  • Windows: compares volume serial numbers

Types

This section is empty.

Jump to

Keyboard shortcuts

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