package
0.27.2
Repository: https://github.com/stashapp/stash.git
Documentation: pkg.go.dev

# Functions

CopyFile copies the contents of the file at srcpath to a regular file at dstpath.
DirExists returns true if the given path exists and is a directory.
EmptyDir will recursively remove the contents of a directory at the given path.
EnsureDir will create a directory at the given path if it doesn't already exist.
EnsureDirAll will create a directory at the given path along with any necessary parents if they don't already exist.
FileExists returns true if the given path exists and is a file.
FindInPaths returns the path to baseName in the first path where it exists from paths.
GetExeName returns the name of the given executable for the current platform.
GetHomeDirectory returns the path of the user's home directory.
GetIntraDir returns a string that can be added to filepath.Join to implement directory depth, "" on error eg given a pattern of 0af63ce3c99162e9df23a997f62621c5 and a depth of 2 length of 3 returns 0af/63c or 0af\63c ( dependin on os) that can be later used like this filepath.Join(directory, intradir, basename).
GetNameFromPath returns the name of a file from its path if stripExtension is true the extension is omitted from the name.
GetWorkingDirectory returns the current working directory.
IsFsPathCaseSensitive checks the fs of the given path to see if it is case sensitive if the case sensitivity can not be determined false and an error != nil are returned.
IsPathInDir returns true if pathToCheck is within dir.
IsPathInDirs returns true if pathToCheck is within anys of the paths in dirs.
MatchExtension returns true if the extension of the provided path matches any of the provided extensions.
NewReadLockManager creates a new ReadLockManager.
RemoveDir removes the given dir (if it exists) along with all of its contents.
SafeMove attempts to move the file with path src to dest using os.Rename.
SanitiseBasename returns a file basename removing any characters that are illegal or problematic to use in the filesystem.
SymWalk extends filepath.Walk to also follow symlinks.
Touch creates an empty file at the given path if it doesn't already exist.
WriteFile writes file to path creating parent directories if needed.

# Structs

ReadLockManager manages read locks on file paths.

# Interfaces