cleantemp

package
v3.62.0 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2023 License: AGPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CleanTempDir

func CleanTempDir(ctx logContext.Context, dirName string, pid int) error

Deletes orphaned temp directories that do not contain running PID values

func MkdirTemp

func MkdirTemp() (string, error)

Returns a temporary directory path formatted as: trufflehog-<pid>-<randint>

Types

type CleanTemp

type CleanTemp interface {
	//Removes orphaned directories from sources like Git
	CleanTempDir(ctx logContext.Context, dirName string, pid int) error
	//Removes orphaned files/artifacts from sources like Artifactory
	CleanTempFiles(ctx context.Context, fileName string, pid int) error
}

Defines the interface for removing orphaned artifacts from aborted scans

Jump to

Keyboard shortcuts

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