files

package
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 13, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ReplaceFile

func ReplaceFile(sourcePath, targetPath string) error

ReplaceFile 用源文件替换目标路径;调用方应确保源文件已完整写入并关闭。

func ReplaceFileWithBackup

func ReplaceFileWithBackup(sourcePath, targetPath, _ string) error

ReplaceFileWithBackup 与 Windows 的 API 形状一致;非 Windows 的 rename 已原子替换目标, 不会产生旧文件备份。

func UserConfigFile

func UserConfigFile(appName, filename string) (string, error)

func UserConfigSubdir

func UserConfigSubdir(appName string) (string, error)

func WritePrivateFile

func WritePrivateFile(path string, body []byte, mode os.FileMode) error

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL