filegroup

package
v0.17.0 Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2025 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CollectFileMetadata

func CollectFileMetadata(
	rootPath, path string,
	fileInfo fs.FileInfo,
	isDirectory bool,
	fgi *fileGroupInfoCollector,
	collectAttributes, followSymlinks, skipSPM bool,
	logger log.Logger) error

func RestoreDirectoryInfo

func RestoreDirectoryInfo(dir DirectoryInfo, rootDir string) error

func RestoreFileInfo

func RestoreFileInfo(fi FileInfo, rootDir string, logger log.Logger) bool
func RestoreSymlink(symlink SymlinkInfo, logger log.Logger) bool

func SetAttributes

func SetAttributes(path string, attributes map[string]string) error

Types

type DirectoryInfo

type DirectoryInfo struct {
	Path    string    `json:"path"`
	ModTime time.Time `json:"modTime"`
}

type FileInfo

type FileInfo struct {
	Path       string            `json:"path"`
	Size       int64             `json:"size"`
	Hash       string            `json:"hash"`
	ModTime    time.Time         `json:"modTime"`
	Mode       os.FileMode       `json:"mode"`
	Attributes map[string]string `json:"attributes,omitempty"`
}

type Info

type Info struct {
	Files       []*FileInfo      `json:"files"`
	Directories []*DirectoryInfo `json:"directories"`
	Symlinks    []*SymlinkInfo   `json:"symlinks,omitempty"`
}

func CollectFileGroupInfo

func CollectFileGroupInfo(cacheDirPath string,
	collectAttributes,
	followSymlinks bool,
	skipSPM bool,
	logger log.Logger) (Info, error)

type SymlinkInfo

type SymlinkInfo struct {
	Path    string    `json:"path"`
	Target  string    `json:"target"`
	ModTime time.Time `json:"modTime"`
}

Jump to

Keyboard shortcuts

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