Documentation
¶
Overview ¶
Package files implements generic file tools missing from the standard library.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExecOnFileLock ¶ added in v0.3.5
ExecOnFileLock opens the lockPath file (or creates if it doesn't yet exist), locks it, and executes the function. If the lockPath is already locked, it polls with a 1 to 2 seconds period (randomly), until it acquires the lock.
The lockPath is not removed. It's safe to remove it from the given fn, if one knows that no new calls to ExecOnFileLock with the same lockPath is going to be made.
func ReplaceTildeInDir ¶
ReplaceTildeInDir by the user's home directory. Returns dir if it doesn't start with "~".
It returns an error if `dir` has an unknown user (e.g: `~unknown/...`)
Types ¶
This section is empty.