Documentation ¶
Overview ¶
Package gofile is file and directory management libraries.
Index ¶
- func CreateDir(dir string) error
- func FilterDirs(dirs []string, opts Option) []string
- func FindAllSubBytes(data []byte, start []byte, end []byte) [][]byte
- func FindSubBytes(data []byte, start []byte, end []byte) []byte
- func FindSubBytesNotIn(data []byte, start []byte, end []byte) []byte
- func FuzzyMatchFiles(f string) []string
- func GetDir(filePath string) string
- func GetFileDir(filePath string) string
- func GetFilename(filePath string) string
- func GetFilenameWithoutSuffix(filePath string) string
- func GetPathDelimiter() string
- func GetRunPath() string
- func IsExists(f string) bool
- func IsWindows() bool
- func Join(elem ...string) string
- func ListDirs(specifiedDir string) ([]string, error)
- func ListDirsAndFiles(dirPath string) (map[string][]string, error)
- func ListFiles(dirPath string, opts ...Option) ([]string, error)
- type Option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FilterDirs ¶
FilterDirs filter directories that meet the criteria
func FindAllSubBytes ¶
FindAllSubBytes find all substrings, including start and end marks
func FindSubBytes ¶
FindSubBytes find first substrings, including start and end marks
func FindSubBytesNotIn ¶
FindSubBytesNotIn find substrings, excluding start and end tags
func FuzzyMatchFiles ¶
FuzzyMatchFiles fuzzy matching of documents, * only
func GetFileDir ¶
GetFileDir get dir, include the last separator
func GetFilenameWithoutSuffix ¶
GetFilenameWithoutSuffix get file name without suffix
func GetPathDelimiter ¶
func GetPathDelimiter() string
GetPathDelimiter get separator by system type
func GetRunPath ¶
func GetRunPath() string
GetRunPath get the absolute path of the program execution
func ListDirsAndFiles ¶
ListDirsAndFiles iterates through all subdirectories of the specified directory, returning the absolute path to the file
Types ¶
type Option ¶
type Option func(*options)
Option set the file options.
func WithNoAbsolutePath ¶ added in v1.0.8
func WithNoAbsolutePath() Option
WithNoAbsolutePath set no absolute path