Documentation
¶
Index ¶
- func CopyAtomicKeepMode(src, dst string, defaultMode os.FileMode) error
- func CopyAtomicMode(src, dst string, mode os.FileMode) error
- func CreateAtomic(dest string, fileMode os.FileMode, r io.Reader) error
- func ExecCommand(ctx context.Context, workDir string, cmd string, opts *ExecOptions) error
- func FileMode(path string) (os.FileMode, error)
- type ExecOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CopyAtomicKeepMode ¶
CopyAtomicKeepMode is like CopyAtomicMode by tries to keep the mode bits of dst if it exists. If dst does not yet exist the mode bits are set to defaultMode.
func CopyAtomicMode ¶
CopyAtomicMode is like CreateAtomic but copies data from src.
func CreateAtomic ¶
CreateAtomic creates or overwrites a file at dest atomically using data from r. Atomic means that even in case of a power outage, dest will never be a zero-length file. It will always either contain the previous data (or not exist) or the new data but never anything in between.
func ExecCommand ¶
ExecCommand executes cmd and returns any error encountered.
Types ¶
type ExecOptions ¶
Click to show internal directories.
Click to hide internal directories.