[Go] Go 语言文件操作演示代码 →→→→→进入此内容的聊天室

来自 , 2021-04-15, 写在 Go, 查看 145 次.
URL http://www.code666.cn/view/0b846c55
  1. func (file *File) Close() os.Error {
  2.     if file == nil {
  3.         return os.EINVAL
  4.     }
  5.     e := syscall.Close(file.fd)
  6.     file.fd = -1 // so it can't be closed again
  7.     if e != 0 {
  8.         return os.Errno(e)
  9.     }
  10.     return nil
  11. }
  12.  
  13.  
  14.  
  15. //go/4351

回复 "Go 语言文件操作演示代码"

这儿你可以回复上面这条便签

captcha