Documentation
¶
Index ¶
- func ReplaceFile(sourcePath, targetPath string) error
- func ReplaceFileWithBackup(sourcePath, targetPath, _ string) error
- func UserConfigFile(appName, filename string) (string, error)
- func UserConfigSubdir(appName string) (string, error)
- func WritePrivateFile(path string, body []byte, mode os.FileMode) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ReplaceFile ¶
ReplaceFile 用源文件替换目标路径;调用方应确保源文件已完整写入并关闭。
func ReplaceFileWithBackup ¶
ReplaceFileWithBackup 与 Windows 的 API 形状一致;非 Windows 的 rename 已原子替换目标, 不会产生旧文件备份。
func UserConfigFile ¶
func UserConfigSubdir ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.