library: os.File.Close

This commit is contained in:
xushiwei
2024-07-28 22:19:40 +08:00
parent 4a350d8ad9
commit 907f326788
2 changed files with 25 additions and 7 deletions

View File

@@ -16,13 +16,10 @@ import (
// be canceled and return immediately with an ErrClosed error.
// Close will return an error if it has already been called.
func (f *File) Close() error {
/*
if f == nil {
return ErrInvalid
}
return f.file.close()
*/
panic("todo: os.(*File).Close")
if f == nil {
return ErrInvalid
}
return f.close()
}
// pread reads len(b) bytes from the File starting at byte offset off.