diff options
author | Ian Lance Taylor <ian@gcc.gnu.org> | 2011-04-07 17:09:10 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@gcc.gnu.org> | 2011-04-07 17:09:10 +0000 |
commit | 405ca10418216fc078ecb29ff13a39c911e8d806 (patch) | |
tree | 39c2c0da7b6c220dd344f134fae07fba0d0266b2 /libgo/go/os/file_unix.go | |
parent | a751005d50fa7347131660e562c5fd9ce3dff75d (diff) | |
download | gcc-405ca10418216fc078ecb29ff13a39c911e8d806.zip gcc-405ca10418216fc078ecb29ff13a39c911e8d806.tar.gz gcc-405ca10418216fc078ecb29ff13a39c911e8d806.tar.bz2 |
libgo: Update to current Go library.
From-SVN: r172106
Diffstat (limited to 'libgo/go/os/file_unix.go')
-rw-r--r-- | libgo/go/os/file_unix.go | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/libgo/go/os/file_unix.go b/libgo/go/os/file_unix.go index 01268e5..f80f1d5 100644 --- a/libgo/go/os/file_unix.go +++ b/libgo/go/os/file_unix.go @@ -19,10 +19,12 @@ type dirInfo struct { // On Unix-like systems, it is "/dev/null"; on Windows, "NUL". const DevNull = "/dev/null" -// Open opens the named file with specified flag (O_RDONLY etc.) and perm, (0666 etc.) -// if applicable. If successful, methods on the returned File can be used for I/O. +// OpenFile is the generalized open call; most users will use Open +// or Create instead. It opens the named file with specified flag +// (O_RDONLY etc.) and perm, (0666 etc.) if applicable. If successful, +// methods on the returned File can be used for I/O. // It returns the File and an Error, if any. -func Open(name string, flag int, perm uint32) (file *File, err Error) { +func OpenFile(name string, flag int, perm uint32) (file *File, err Error) { r, e := syscall.Open(name, flag|syscall.O_CLOEXEC, perm) if e != 0 { return nil, &PathError{"open", name, Errno(e)} |