Documentation
¶
Index ¶
Constants ¶
View Source
const ( // Default permissions used for directories DefaultDirectoryMode os.FileMode = 0700 )
Variables ¶
This section is empty.
Functions ¶
func AtomicWriteFile ¶
AtomicWriteFile safely replaces a file using a temporary file and an atomic rename.
The temporary file is created in the destination directory to ensure the rename operation is atomic on the same filesystem.
On success, the destination file is either completely replaced or left untouched if an error occurs.
func CreateDirectory ¶ added in v0.5.3
EnsureDirectory makes sure a directory exists.
If the directory does not exist, it is created using the default GitBack directory permissions.
Returns:
created == true
when the directory had to be created.
The returned error always includes the directory path for easier troubleshooting.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.