Golang os.File.Fd() function example
package os
Golang os.File.Fd() function usage example
file, err := os.Open("file.data")
if err != nil {
fmt.Println(err)
continue
}
fileDescriptor := int(file.Fd()) // get the unix descriptor
file.Close()
References :
http://golang.org/pkg/os/#File.Fd
http://www.theunixschool.com/2010/08/unix-file-descriptors.html
Advertisement
Something interesting
Tutorials
+7.4k Android Studio : How to detect camera, activate and capture example
+10.5k Fix ERROR 1045 (28000): Access denied for user 'root'@'ip-address' (using password: YES)
+9.6k Golang : Quadratic example
+16.5k Golang : File path independent of Operating System
+9.5k Golang : Get all countries currencies code in JSON format
+8k Golang : Get all countries phone codes
+17.7k Golang : [json: cannot unmarshal object into Go value of type]
+20.2k Golang : Determine if directory is empty with os.File.Readdir() function
+11.6k Swift : Convert (cast) Float to String
+6.2k Golang : Get Hokkien(福建话)/Min-nan(閩南語) Pronounciations
+4.7k JavaScript: Add marker function on Google Map
+11.2k Golang : How to pipe input data to executing child process?