dirsig

package
v0.0.0-...-51a858e Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2017 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Overview

Searches the system for matching groups of directories, based on a signature file placed in the directories containing a UUID

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Find

func Find(filename string, dirHint string, depth uint) map[string][]string

Recursively search all system mounts and the user's home folder for signature files named 'filename' to a maximum depth of 'depth.' If 'dirHint' is not "" only recurse into folders named 'dirHint'

Returns a map of signature UUIDs to slices of paths sharing that signature

Types

type Signature

type Signature struct {
	UUID     string
	Filename string
}

Stores a UUID signature to identify a group of directories

func NewSignature

func NewSignature(filename string) (s *Signature)

Creates a new, random, signature

func ReadSignature

func ReadSignature(dir string, filename string) (s *Signature, err error)

Reads a signature file 'filename' from 'dir'

func (Signature) Write

func (s Signature) Write(dir string) (err error)

Writes the signature to the specified directory.

Jump to

Keyboard shortcuts

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