Documentation ¶
Index ¶
- func SearchByExtension(rootPath string, ext string) ([]string, error)
- func SearchByFileName(rootPath string, baseName string) ([]string, error)
- func SearchByFileNameRegex(rootPath string, baseNameRegex string) ([]string, error)
- func SearchClosestParentContaining(startPath string, contains string) (string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SearchByExtension ¶
SearchByExtension Given a path, returns all sub-paths to files that have the specified extension 'ext'. Note that 'ext' must include a dot.
func SearchByFileName ¶
SearchByFileName Given a path, returns all sub-paths to files that are named exactly like fileName rootPath must be absolute TODO some thing that supports "real" globs would be nice.
func SearchByFileNameRegex ¶
SearchByFileNameRegex Given a path, returns all sub-paths to files that have names that match the passed regex. rootPath must be absolute TODO some thing that supports "real" globs would be nice.
func SearchClosestParentContaining ¶
SearchClosestParentContaining returns the closest parent (which may be 'startPath' itself) that contains a file or directory named 'contains'. Note that the name must match exactly. startPath may be relative or absolute. On success, it will return an absolute path to a directory containing something named 'contain'
Types ¶
This section is empty.