Documentation ¶
Overview ¶
Package xfilepath defines functions to define path retrievers that support error handling
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PathRetriever ¶
PathRetriever is a function that retrieve the contained path or an error
func Join ¶
func Join(paths ...PathRetriever) PathRetriever
Join returns a path retriever from the join of the provided path retrievers The returned path retriever eventually returns the error from the first provided path retrievers that returns a non-nil error
func JoinFromHome ¶
func JoinFromHome(paths ...PathRetriever) PathRetriever
JoinFromHome returns a path retriever from the join of the user home and the provided path retrievers The returned path retriever eventually returns the error from the first provided path retrievers that returns a non-nil error
func Path ¶
func Path(path string) PathRetriever
Path returns a path retriever from the provided path
func PathWithError ¶
func PathWithError(path string, err error) PathRetriever
PathWithError returns a path retriever from the provided path and error
type PathsRetriever ¶
PathsRetriever is a function that retrieve the contained list of paths or an error
func List ¶
func List(paths ...PathRetriever) PathsRetriever
List returns a paths retriever from a list of path retrievers The returned paths retriever eventually returns the error from the first provided path retrievers that returns a non-nil error