Documentation
¶
Index ¶
Constants ¶
View Source
const ( DirPerm = 0o700 // rwx------ FilePerm = 0o600 // rw------- )
File permission constants
Variables ¶
This section is empty.
Functions ¶
func ChangeDirectory ¶ added in v0.3.23
ChangeDirectory modifies a file path by changing its directory prefix. If the filename starts with swapDir, it replaces it with dir. Otherwise, it prepends dir to the path.
func FileExists ¶ added in v0.3.23
FileExists checks if a file exists and is a regular file (not a directory).
func WriteToFile ¶
WriteToFile writes data to a file, creating directories as needed. It creates parent directories with DirPerm and the file with FilePerm.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.