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

@@ -272,7 +272,6 @@ func Mkdir(name string, perm FileMode) error {
// TODO(xsw):
// func MkdirAll(path string, perm FileMode) error
// func MkdirTemp(dir, pattern string) (string, error)
// func NewSyscallError(syscall string, err error) error
// func ReadFile(name string) ([]byte, error)
@@ -327,9 +326,6 @@ func Symlink(oldname, newname string) error {
return &LinkError{"symlink", oldname, newname, syscall.Errno(ret)}
}
// TODO(xsw):
// func TempDir() string
func Truncate(name string, size int64) error {
ret := os.Truncate(c.AllocaCStr(name), os.OffT(size))
if ret == 0 {