Documentation
¶
Index ¶
- func Exists(path string) bool
- func GetCompressedFiles(files []scan.File, rootPath string) (newfiles []scan.File, compresspaths []string, err error)
- func GetConvertedFiles(files []scan.File) (convertedFiles []scan.File, convertedPaths []string)
- func GetFileFromStream(cfg *cfgreader.EarlybirdConfig) []scan.File
- func GetFileSize(path string) (size int64, err error)
- func GetWD() (string, error)
- func IsEmpty(path string) (bool, error)
- func MultipartToScanFiles(files []*multipart.FileHeader, cfg cfgreader.EarlybirdConfig) (fileList []scan.File, err error)
- func Uncompress(src string, dest string) (filenames []string, err error)
- type Context
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetCompressedFiles ¶
func GetCompressedFiles(files []scan.File, rootPath string) (newfiles []scan.File, compresspaths []string, err error)
GetCompressedFiles provides all the files contained within compressed files
func GetConvertedFiles ¶
GetConvertedFiles converts files into plaintext
func GetFileFromStream ¶
func GetFileFromStream(cfg *cfgreader.EarlybirdConfig) []scan.File
GetFileFromStream Builds a file as a collection of lines from the input stream. This will be fed to the scan modules.
func GetFileSize ¶
GetFileSize returns the file size of target file
func MultipartToScanFiles ¶
func MultipartToScanFiles(files []*multipart.FileHeader, cfg cfgreader.EarlybirdConfig) (fileList []scan.File, err error)
MultipartToScanFiles converts the multipart file upload into Earlybird files
Types ¶
type Context ¶
type Context struct { Files []scan.File CompressPaths, ConvertPaths, IgnorePatterns, SkippedFiles []string }
Context is the file system context used for the scan process
func GetFiles ¶
func GetFiles(searchDir, ignoreFile string, verbose bool, maxFileSize int64) (fileContext Context, err error)
GetFiles Build the list of files
func GetGitFiles ¶
func GetGitFiles(fileType string, cfg *cfgreader.EarlybirdConfig) (fileContext Context, err error)
GetGitFiles Builds the list of staged or tracked files
Click to show internal directories.
Click to hide internal directories.