Documentation ¶ Index ¶ func GetParentDir(strFileName string) (dirParent string) func GetSuffix(strFileName string) string type DirEntry func GetFilesAndDirs(dirPath string, suffixs ...string) (d DirEntry, err error) func (d *DirEntry) GetDirs() []*DirEntry func (d *DirEntry) GetFiles() []*FileEntry type FileEntry Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ func GetParentDir ¶ func GetParentDir(strFileName string) (dirParent string) 获取指定文件或目录的上级目录 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 } Source Files ¶ View all Source files directory.go entry.go Directories ¶ Show internal Expand all Path Synopsis test Click to show internal directories. Click to hide internal directories.