scanFileDir

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2021 License: MIT Imports: 6 Imported by: 7 modules, 7 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RecurseScanSymlink(path, linkEndPoint string) (fileList []string, err error)

Scan dir and subdir to get symlinks with specified endpoint.

func ScanDir

func ScanDir(root string, showDirs ...bool) (files []string, err error)

ScanDir: retrieve filenames in a specific directory

func ScanDirDepth

func ScanDirDepth(root string, depth int, optParam ...bool) (files []string, err error)

ScanDirDepth: retrieve files in a specific directory and his sub-directory depending on depth argument. depth = -1 means infinite, depth = 0 means no sub-dir. optParams: showDir, followSymlinks as bool.

func ScanDirFileInfo

func ScanDirFileInfo(root string) (infosF []os.FileInfo, err error)

ScanDirFileInfo: retrieve []os.FileInfo from a defined directory

func ScanDirFileInfoMask

func ScanDirFileInfoMask(root string, masks []string) (
	infosFiles,
	infosDirs,
	infosSymlink []os.FileInfo,
	err error)

ScanDirFileInfoMask: retrieve []os.FileInfo from a defined directory "masks" is used to filter files that are kept. infosFiles, infosDirs, infosSymlink as return arguments.

func ScanSubDir

func ScanSubDir(root string, showDirs ...bool) (files []string, err error)

ScanSubDir: retrieve files in a specific directory and his sub-directory. does not follow symlink (walk)

Types

type ScanDirFileInfos

type ScanDirFileInfos struct {
	Filename string
	FileInfo os.FileInfo
}

func ScanDirDepthFileInfo

func ScanDirDepthFileInfo(root string, depth int, optParam ...bool) (files []ScanDirFileInfos, err error)

ScanDirDepthFileInfo: retrieve files in a specific directory and his sub-directory depending on depth argument. depth = -1 means infinite, depth = 0 means no sub-dir. optParams: showDir, followSymlinks as bool. return a structure that contain filename and os.FileInfo.

Jump to

Keyboard shortcuts

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