1
0
mirror of https://github.com/golang/go synced 2024-10-02 18:18:33 -06:00
Commit Graph

11 Commits

Author SHA1 Message Date
Rob Pike
8a90fd3c72 os: New Open API.
We replace the current Open with:
OpenFile(name, flag, perm) // same as old Open
Open(name) // same as old Open(name, O_RDONLY, 0)
Create(name) // same as old Open(name, O_RDWR|O_TRUNC|O_CREAT, 0666)

This CL includes a gofix module and full code updates: all.bash passes.
(There may be a few comments I missed.)

The interesting packages are:
        gofix
        os
Everything else is automatically generated except for hand tweaks to:
        src/pkg/io/ioutil/ioutil.go
        src/pkg/io/ioutil/tempfile.go
        src/pkg/crypto/tls/generate_cert.go
        src/cmd/goyacc/goyacc.go
        src/cmd/goyacc/units.y

R=golang-dev, bradfitzwork, rsc, r2
CC=golang-dev
https://golang.org/cl/4357052
2011-04-04 23:42:14 -07:00
Alex Brainman
cf75c86cdf syscall: change windows apis with bool return value to return errno instead
This change is to make these apis similar to their unix counterparts.

R=rsc
CC=golang-dev
https://golang.org/cl/4185042
2011-02-11 10:15:51 +11:00
Russ Cox
69c4e9380b use append
R=gri, r, r2
CC=golang-dev
https://golang.org/cl/2743042
2010-10-27 19:47:23 -07:00
Russ Cox
d86ab015f7 use copy
R=gri
CC=golang-dev
https://golang.org/cl/2763041
2010-10-26 21:52:54 -07:00
Alex Brainman
17fe2479bf os: make tests work on windows
Fixes #1105.

R=golang-dev, r
CC=Joe Poirier, golang-dev
https://golang.org/cl/2343043
2010-10-04 17:31:49 +11:00
Peter Mundy
bfb127612a os: check for valid arguments in windows Readdir
Fixes #1129.

R=rsc, brainman
CC=Joe Poirier, golang-dev
https://golang.org/cl/2211045
2010-09-23 22:06:59 -04:00
Robert Griesemer
7534d40f64 fix various comments
(os package comments were duplicates)

R=rsc
CC=golang-dev
https://golang.org/cl/2205042
2010-09-16 18:21:01 -07:00
Robert Griesemer
304d72be8c os: error in documentation
R=r
CC=golang-dev
https://golang.org/cl/2225041
2010-09-15 15:38:16 -07:00
Rob Pike
e45b58fe96 os: change the type of permissions argument for Open etc. to uint32.
Besides being more correct, it protects against people accidentally
exchanging the permission and open mode arguments to Open.

R=rsc
CC=golang-dev
https://golang.org/cl/1904045
2010-08-04 08:34:52 +10:00
Peter Mundy
12befd063b os: Null device
R=rsc, cw
CC=golang-dev
https://golang.org/cl/1854042
2010-08-03 13:03:50 -07:00
Alex Brainman
f81d471940 rename GOOS=mingw to GOOS=windows
R=rsc, Joe Poirier
CC=golang-dev
https://golang.org/cl/1015043
2010-04-29 23:45:14 -07:00