mirror of https://github.com/golang/go.git
os: deduplicate File definition
Fixes #16993. Change-Id: Ibe406f97d2a49acae94531d969c56dbac8ce53b2 Reviewed-on: https://go-review.googlesource.com/28511 Run-TryBot: Minux Ma <minux@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
parent
269ff8e603
commit
5514332ed9
|
|
@ -11,11 +11,6 @@ import (
|
|||
"time"
|
||||
)
|
||||
|
||||
// File represents an open file descriptor.
|
||||
type File struct {
|
||||
*file
|
||||
}
|
||||
|
||||
// file is the real representation of *File.
|
||||
// The extra level of indirection ensures that no clients of os
|
||||
// can overwrite this data, which could cause the finalizer
|
||||
|
|
|
|||
|
|
@ -19,11 +19,6 @@ func rename(oldname, newname string) error {
|
|||
return nil
|
||||
}
|
||||
|
||||
// File represents an open file descriptor.
|
||||
type File struct {
|
||||
*file
|
||||
}
|
||||
|
||||
// file is the real representation of *File.
|
||||
// The extra level of indirection ensures that no clients of os
|
||||
// can overwrite this data, which could cause the finalizer
|
||||
|
|
|
|||
|
|
@ -15,11 +15,6 @@ import (
|
|||
"unsafe"
|
||||
)
|
||||
|
||||
// File represents an open file descriptor.
|
||||
type File struct {
|
||||
*file
|
||||
}
|
||||
|
||||
// file is the real representation of *File.
|
||||
// The extra level of indirection ensures that no clients of os
|
||||
// can overwrite this data, which could cause the finalizer
|
||||
|
|
|
|||
|
|
@ -12,6 +12,11 @@ import (
|
|||
// Getpagesize returns the underlying system's memory page size.
|
||||
func Getpagesize() int { return syscall.Getpagesize() }
|
||||
|
||||
// File represents an open file descriptor.
|
||||
type File struct {
|
||||
*file // os specific
|
||||
}
|
||||
|
||||
// A FileInfo describes a file and is returned by Stat and Lstat.
|
||||
type FileInfo interface {
|
||||
Name() string // base name of the file
|
||||
|
|
|
|||
Loading…
Reference in New Issue