hardlink

package
v1.12.0 Latest Latest
Warning

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

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

Documentation

Overview

Package hardlink provides filesystem hardlink detection utilities.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsAnyHardlinked

func IsAnyHardlinked(basePath string, filePaths []string) bool

IsAnyHardlinked returns true if at least one REGULAR file has link count > 1. Directories, symlinks, and non-regular files are skipped. Inaccessible files are skipped. Handles both relative paths (joined with basePath) and absolute paths.

func LinkInfo

func LinkInfo(fi os.FileInfo, _ string) (fileID string, nlink uint64, err error)

LinkInfo returns the unique file identifier and link count for a file. On Unix systems, fileID is composed of device ID and inode number. This enables hardlink accounting to distinguish between: - hardlinks within the torrent set (cross-seeds) - hardlinks outside the torrent set (arr imports)

Types

This section is empty.

Jump to

Keyboard shortcuts

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