dir

package
v1.1.4 Latest Latest
Warning

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

Go to latest
Published: May 14, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetParentDir

func GetParentDir(strFileName string) (dirParent string)

获取指定文件或目录的上级目录

func GetProgramAbsDir added in v1.1.4

func GetProgramAbsDir() (strPath string)

get current program abs path dir

func GetSuffix

func GetSuffix(strFileName string) string

Types

type DirEntry

type DirEntry struct {
	Name     string
	DirName  string
	PathName string
	Time     time.Time
	// contains filtered or unexported fields
}

func GetFilesAndDirs

func GetFilesAndDirs(dirPath string, suffixs ...string) (d DirEntry, err error)

获取指定目录下的所有文件和目录(不递归)

func (*DirEntry) GetDirs

func (d *DirEntry) GetDirs() []*DirEntry

func (*DirEntry) GetFiles

func (d *DirEntry) GetFiles() []*FileEntry

type FileEntry

type FileEntry struct {
	Name     string
	DirName  string
	PathName string
	Mode     os.FileMode
	Size     int64
	Time     time.Time
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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