Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EnsureDirectoryExists ¶
EnsureDirectoryExists ensures that a directory exists at :pathToDirectory, returning an error only if a directory cannot be ensured to exist there
func FindParentContainingChildDirectory ¶
func FindParentContainingChildDirectory(targetDirectoryName, startingFrom string, levels ...int) (string, error)
FindParentContainingChildDirectory continously ascends from the initial directory path at `startingFrom` and checks for the existence of a child directory named `targetDirectoryName` for `levels[0]` levels.
On successfully finding such a child directory, it returns the path of the parent directory as the first argument, on failing to find, it returns an empty string. In both cases, the returned `error`-typed argument will be nil.
If the function failed to complete, the second `error`-typed argument will be non-nil.
func IsDirectoryEmpty ¶
IsDirectoryEmpty returns whether the provided directory located at :pathToDirectory is empty or not. If the error return is not nil, this indicates a system-type error
Types ¶
This section is empty.