lib/os: patch TempDir, MkdirTemp, CreateTemp

This commit is contained in:
Aofei Sheng
2024-08-12 18:18:04 +08:00
parent 321766fd46
commit 30b1660005
4 changed files with 133 additions and 6 deletions

View File

@@ -286,7 +286,6 @@ func (f *File) wrapErr(op string, err error) error {
return &PathError{Op: op, Path: f.name, Err: err}
}
/*
// TempDir returns the default directory to use for temporary files.
//
// On Unix systems, it returns $TMPDIR if non-empty, else /tmp.
@@ -299,7 +298,6 @@ func (f *File) wrapErr(op string, err error) error {
func TempDir() string {
return tempDir()
}
*/
// Chmod changes the mode of the file to mode.
// If there is an error, it will be of type *PathError.