Documentation ¶
Index ¶
- func DirsExist(paths []string) error
- func FileExists(path string) bool
- func FileReadLine(path string) (string, error)
- func FileSize(path string) (int64, error)
- func FindAllDirs(path string) ([]string, error)
- func FindFileInParentDirs(startPath, filename string) (string, error)
- func FindFilesInSubDir(searchDir, filename string, maxdepth int) ([]string, error)
- func Glob(path string) ([]string, error)
- func IsDir(path string) (bool, error)
- func IsFile(path string) (bool, error)
- func PathsJoin(rootPath string, relPaths []string) []string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FileExists ¶
FileExists returns true if path exist and is a file
func FileReadLine ¶
FileReadLine reads the first line from a file
func FindAllDirs ¶
FindAllDirs returns recursively all diretories in path, including the passed path dir
func FindFileInParentDirs ¶
FindFileInParentDirs finds a directory that contains filename. The function starts searching in startPath and then checks recursively each parent directory for the file. It returns the absolute path to the first found directory contains the file. If it reaches the root directory without finding the file it returns os.ErrNotExist
func FindFilesInSubDir ¶
FindFilesInSubDir returns all directories that contain filename that are in searchDir. The function descends up to maxdepth levels of directories below searchDir
func Glob ¶
Glob is similar then filepath.Glob() but also support '**' to match files and directories recursively and only returns paths to Files. If a Glob doesn't match any files an empty []string is returned and error is nil
Types ¶
This section is empty.