utils

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HasAllowedFilesInRegular

func HasAllowedFilesInRegular(regularFiles []parser.ParsedFile, allowedExtensions []string, filterSamples bool) bool

HasAllowedFilesInRegular checks if any regular (non-archive) files match allowed extensions If allowedExtensions is empty, all file types are allowed

func HasPopularExtension

func HasPopularExtension(filePath string) bool

HasPopularExtension reports whether file_path has a popular extension (case-insensitive) or matches known RAR or 7zip patterns (e.g., .rar, .r00, .partXX.rar, .7z, .7z.001).

func IsAllowedFile

func IsAllowedFile(filename string, size int64, allowedExtensions []string, filterSamples bool) bool

IsAllowedFile checks if a filename has an allowed extension If allowedExtensions is empty, all files are allowed size is used to prevent false positives for sample/proof checks on large files

Types

This section is empty.

Jump to

Keyboard shortcuts

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