Documentation
¶
Overview ¶
Package io provides functions for interfacing with input and output.
Index ¶
- func AddFileURI(hostname string, uri string) string
- func CopyFile(source string, destination string) error
- func DirectoryExists(path string) bool
- func EnsureDirectory(uri string) error
- func ExecuteWithTimeout(timeout time.Duration, name string, args ...string) ([]byte, error)
- func FileExists(path string) bool
- func FileExistsInPath(fileName string) (bool, error)
- func NormalizePathSeparators(input string) string
- func ParseFileURI(uri string) (string, string)
- func Remove(uri string) error
- func RemoveRecursive(uri string) error
- func SanitizeDirectory(input string) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddFileURI ¶
AddFileURI ensures the file:// prefix exists on a URI.
func DirectoryExists ¶
DirectoryExists checks whether a directory exists.
func EnsureDirectory ¶
EnsureDirectory ensures a directory exists.
func ExecuteWithTimeout ¶
ExecuteWithTimeout executes a command, killing it after too long.
func FileExistsInPath ¶
FileExistsInPath checks whether a file exists anywhere in the system path.
func NormalizePathSeparators ¶
NormalizePathSeparators ensures that paths have correct slashes.
func ParseFileURI ¶
ParseFileURI removes the file:// prefix and returns the hostname and file paths from a URI.
func RemoveRecursive ¶
RemoveRecursive removes a directory and its children, recursively.
func SanitizeDirectory ¶
SanitizeDirectory ensures a directory path is safe.
Types ¶
This section is empty.