scanFileDir

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2021 License: MIT Imports: 6 Imported by: 0

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