add

package
v0.0.0-...-8c65269 Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AddCmd = &cobra.Command{
	Use:   "add",
	Short: "Indexes the directory and adds it to the existing index group for future scanning",
	Long: `
	If there's no path specified for scanning, it adds the directory to the pool.
	It then checks each file, computes checksums, and stores them in the database for comparison during subsequent scans.
`,

	Run: func(cmd *cobra.Command, args []string) {
		if addPath != "" {
			_, err := os.Stat(addPath)
			if err != nil {
				fmt.Println("the driectry doesn't exist")
				os.Exit(1)

			}
			TripAdd(addPath)
		}

	},
}

AddCmd represents the add command

Functions

func TripAdd

func TripAdd(fPath string) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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