Documentation ¶
Index ¶
- Constants
- func AtomicCopy(srcFilepath, targetDir, targetFilename string) error
- func AtomicWrite(path string, data []byte, mode os.FileMode) error
- func AtomicWriteReader(path string, data io.Reader, mode os.FileMode) error
- func Copy(srcFilepath, targetDir, targetFilename string) error
- func DirEquals(a, b string) (bool, error)
- func Exists(name string) bool
Constants ¶
View Source
const (
// PrivateFileMode grants owner to read/write a file.
PrivateFileMode = 0o600
)
Variables ¶
This section is empty.
Functions ¶
func AtomicCopy ¶
AtomicCopy copies file by reading the file then writing atomically into the target directory
func AtomicWrite ¶
Write atomically by writing to a temporary file in the same directory then renaming
func AtomicWriteReader ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.