File tree 3 files changed +4
-1
lines changed 3 files changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -25,7 +25,8 @@ type file struct {
25
25
dirinfo * dirInfo // nil unless directory being read
26
26
}
27
27
28
- // Fd returns the integer Unix file descriptor referencing the open file.
28
+ // Fd returns the integer Plan 9 file descriptor referencing the open file.
29
+ // The file descriptor is valid only until f.Close is called or f is garbage collected.
29
30
func (f * File ) Fd () uintptr {
30
31
if f == nil {
31
32
return ^ (uintptr (0 ))
Original file line number Diff line number Diff line change @@ -29,6 +29,7 @@ type file struct {
29
29
}
30
30
31
31
// Fd returns the integer Unix file descriptor referencing the open file.
32
+ // The file descriptor is valid only until f.Close is called or f is garbage collected.
32
33
func (f * File ) Fd () uintptr {
33
34
if f == nil {
34
35
return ^ (uintptr (0 ))
Original file line number Diff line number Diff line change @@ -36,6 +36,7 @@ type file struct {
36
36
}
37
37
38
38
// Fd returns the Windows handle referencing the open file.
39
+ // The handle is valid only until f.Close is called or f is garbage collected.
39
40
func (file * File ) Fd () uintptr {
40
41
if file == nil {
41
42
return uintptr (syscall .InvalidHandle )
You can’t perform that action at this time.
0 commit comments