Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(218)

Issue 5416060: code review 5416060: io: new FileInfo, FileMode types + update tree (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
13 years, 4 months ago by rsc
Modified:
13 years, 3 months ago
Reviewers:
CC:
golang-dev, r, r2, gri, bradfitz, iant, iant2, nigeltao, niemeyer
Visibility:
Public.

Description

os: new FileInfo, FileMode types + update tree

Patch Set 1 #

Patch Set 2 : diff -r 0c75ae21c217 https://go.googlecode.com/hg/ #

Total comments: 10

Patch Set 3 : diff -r 0c75ae21c217 https://go.googlecode.com/hg/ #

Total comments: 5

Patch Set 4 : diff -r c9b389dd5f03 https://go.googlecode.com/hg/ #

Total comments: 15

Patch Set 5 : diff -r d917a203b389 https://go.googlecode.com/hg/ #

Patch Set 6 : diff -r d917a203b389 https://go.googlecode.com/hg/ #

Patch Set 7 : diff -r d917a203b389 https://go.googlecode.com/hg/ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+620 lines, -525 lines) Patch
M misc/dashboard/builder/main.go View 1 2 3 4 1 chunk +2 lines, -2 lines 0 comments Download
M misc/dashboard/builder/package.go View 1 2 3 4 1 chunk +5 lines, -5 lines 0 comments Download
M src/cmd/godoc/codewalk.go View 1 2 3 2 chunks +2 lines, -2 lines 0 comments Download
M src/cmd/godoc/dirtrees.go View 1 2 3 2 chunks +6 lines, -5 lines 0 comments Download
M src/cmd/godoc/filesystem.go View 1 2 3 3 chunks +10 lines, -50 lines 0 comments Download
M src/cmd/godoc/godoc.go View 1 2 3 5 chunks +8 lines, -22 lines 0 comments Download
M src/cmd/godoc/httpzip.go View 1 2 3 4 5 7 chunks +34 lines, -28 lines 0 comments Download
M src/cmd/godoc/index.go View 1 2 3 3 chunks +4 lines, -3 lines 0 comments Download
M src/cmd/godoc/parser.go View 1 2 2 chunks +2 lines, -1 line 0 comments Download
M src/cmd/godoc/zip.go View 1 2 3 4 3 chunks +15 lines, -10 lines 0 comments Download
M src/cmd/gofix/main.go View 1 2 3 4 3 chunks +7 lines, -6 lines 0 comments Download
M src/cmd/gofmt/gofmt.go View 1 2 3 4 3 chunks +7 lines, -6 lines 0 comments Download
M src/cmd/goinstall/download.go View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M src/cmd/govet/govet.go View 1 2 3 2 chunks +3 lines, -3 lines 0 comments Download
M src/cmd/hgpatch/main.go View 1 2 3 2 chunks +2 lines, -2 lines 0 comments Download
M src/pkg/archive/zip/reader.go View 1 1 chunk +1 line, -1 line 0 comments Download
M src/pkg/exp/gotype/gotype.go View 1 2 3 1 chunk +6 lines, -6 lines 0 comments Download
M src/pkg/exp/types/check_test.go View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M src/pkg/exp/types/gcimporter.go View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M src/pkg/exp/types/gcimporter_test.go View 1 2 3 1 chunk +5 lines, -5 lines 0 comments Download
M src/pkg/go/build/build.go View 1 2 1 chunk +3 lines, -3 lines 0 comments Download
M src/pkg/go/build/dir.go View 1 2 3 7 chunks +18 lines, -17 lines 0 comments Download
M src/pkg/go/build/path.go View 1 2 3 2 chunks +2 lines, -2 lines 0 comments Download
M src/pkg/go/parser/interface.go View 1 2 2 chunks +3 lines, -4 lines 0 comments Download
M src/pkg/go/parser/parser_test.go View 1 2 1 chunk +1 line, -1 line 0 comments Download
M src/pkg/io/ioutil/ioutil.go View 1 2 3 chunks +10 lines, -14 lines 0 comments Download
M src/pkg/io/ioutil/ioutil_test.go View 1 2 3 2 chunks +4 lines, -4 lines 0 comments Download
M src/pkg/net/http/fs.go View 1 2 3 6 chunks +10 lines, -10 lines 0 comments Download
M src/pkg/net/http/fs_test.go View 1 2 3 4 1 chunk +2 lines, -2 lines 0 comments Download
M src/pkg/os/dir_windows.go View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M src/pkg/os/exec/lp_unix.go View 1 1 chunk +1 line, -1 line 0 comments Download
M src/pkg/os/exec/lp_windows.go View 1 2 3 4 1 chunk +3 lines, -3 lines 0 comments Download
A src/pkg/os/export_test.go View 1 2 3 4 1 chunk +10 lines, -0 lines 0 comments Download
M src/pkg/os/file_unix.go View 1 2 3 4 2 chunks +23 lines, -30 lines 0 comments Download
M src/pkg/os/file_windows.go View 1 2 3 4 1 chunk +3 lines, -3 lines 0 comments Download
M src/pkg/os/getwd.go View 1 2 3 4 5 chunks +6 lines, -6 lines 0 comments Download
M src/pkg/os/os_test.go View 1 2 3 4 10 chunks +39 lines, -97 lines 0 comments Download
A src/pkg/os/os_unix_test.go View 1 2 3 4 1 chunk +75 lines, -0 lines 0 comments Download
M src/pkg/os/path.go View 1 2 3 3 chunks +3 lines, -3 lines 0 comments Download
M src/pkg/os/stat_darwin.go View 1 2 3 4 1 chunk +37 lines, -20 lines 0 comments Download
M src/pkg/os/stat_freebsd.go View 1 2 3 4 1 chunk +37 lines, -20 lines 0 comments Download
M src/pkg/os/stat_linux.go View 1 2 3 4 1 chunk +37 lines, -20 lines 0 comments Download
M src/pkg/os/stat_openbsd.go View 1 2 3 4 1 chunk +37 lines, -20 lines 0 comments Download
M src/pkg/os/stat_windows.go View 1 2 3 4 5 chunks +19 lines, -19 lines 0 comments Download
M src/pkg/os/types.go View 1 2 3 4 1 chunk +88 lines, -36 lines 0 comments Download
M src/pkg/os/user/user_test.go View 1 2 3 1 chunk +2 lines, -2 lines 0 comments Download
M src/pkg/path/filepath/match.go View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M src/pkg/path/filepath/path.go View 1 2 3 4 5 chunks +14 lines, -18 lines 0 comments Download
M src/pkg/path/filepath/path_test.go View 1 2 3 4 4 chunks +5 lines, -4 lines 0 comments Download
M src/pkg/time/zoneinfo_plan9.go View 1 2 1 chunk +4 lines, -4 lines 0 comments Download

Messages

Total messages: 36
rsc
Hello golang-dev@googlegroups.com, I'd like you to review this change to https://go.googlecode.com/hg/
13 years, 4 months ago (2011-11-21 19:12:04 UTC) #1
r
http://codereview.appspot.com/5416060/diff/2001/src/pkg/io/fileinfo.go File src/pkg/io/fileinfo.go (right): http://codereview.appspot.com/5416060/diff/2001/src/pkg/io/fileinfo.go#newcode13 src/pkg/io/fileinfo.go:13: // describe the same file. For example, on Unix ...
13 years, 4 months ago (2011-11-21 19:36:23 UTC) #2
r2
part of me feels io is the wrong place for this, that putting it here ...
13 years, 4 months ago (2011-11-21 19:37:39 UTC) #3
rsc
On Mon, Nov 21, 2011 at 14:37, Rob 'Commander' Pike <r@google.com> wrote: > part of ...
13 years, 4 months ago (2011-11-21 19:42:11 UTC) #4
gri
FYI. I don't mind this being in package io for a start. Perhaps theres' a ...
13 years, 4 months ago (2011-11-21 19:47:54 UTC) #5
r2
On Nov 21, 2011, at 11:42 AM, Russ Cox wrote: > On Mon, Nov 21, ...
13 years, 4 months ago (2011-11-21 19:56:14 UTC) #6
r
http://codereview.appspot.com/5416060/diff/2001/src/pkg/io/fileinfo.go File src/pkg/io/fileinfo.go (right): http://codereview.appspot.com/5416060/diff/2001/src/pkg/io/fileinfo.go#newcode33 src/pkg/io/fileinfo.go:33: ModeDir FileMode = 1 << (32 - 1 - ...
13 years, 4 months ago (2011-11-21 19:57:25 UTC) #7
rsc
On Mon, Nov 21, 2011 at 14:57, <r@golang.org> wrote: > yes they are gri has ...
13 years, 4 months ago (2011-11-21 20:01:44 UTC) #8
rsc
On Mon, Nov 21, 2011 at 14:36, <r@golang.org> wrote: > since i get dinged, so ...
13 years, 4 months ago (2011-11-21 20:12:46 UTC) #9
r2
On Nov 21, 2011, at 12:12 PM, Russ Cox wrote: > On Mon, Nov 21, ...
13 years, 4 months ago (2011-11-21 20:13:44 UTC) #10
rsc
On Mon, Nov 21, 2011 at 14:47, <gri@golang.org> wrote: > http://codereview.appspot.com/5416060/diff/2001/src/pkg/io/fileinfo.go#newcode9 > src/pkg/io/fileinfo.go:9: Mode() FileMode ...
13 years, 4 months ago (2011-11-21 20:18:45 UTC) #11
bradfitz
On Mon, Nov 21, 2011 at 3:13 PM, Rob 'Commander' Pike <r@google.com> wrote: > > ...
13 years, 4 months ago (2011-11-21 20:19:03 UTC) #12
rsc
It seems overly pedantic, even to me. I am not going to complain if some ...
13 years, 4 months ago (2011-11-21 20:21:41 UTC) #13
rsc
PTAL Moved back into os.
13 years, 4 months ago (2011-11-21 20:30:45 UTC) #14
iant
FYI Have you just not gotten around to the five other os/stat_XXX.go files? http://codereview.appspot.com/5416060/diff/5006/src/cmd/godoc/dirtrees.go File ...
13 years, 4 months ago (2011-11-21 20:51:32 UTC) #15
rsc
On Mon, Nov 21, 2011 at 15:51, <iant@golang.org> wrote: > Have you just not gotten ...
13 years, 4 months ago (2011-11-21 20:52:49 UTC) #16
rsc
On Mon, Nov 21, 2011 at 15:51, <iant@golang.org> wrote: > There seems to be a ...
13 years, 4 months ago (2011-11-21 20:54:33 UTC) #17
gri
oops - don't know what I was thinking (not much, i guess) - on to ...
13 years, 4 months ago (2011-11-21 21:02:57 UTC) #18
iant2
Russ Cox <rsc@golang.org> writes: > On Mon, Nov 21, 2011 at 15:51, <iant@golang.org> wrote: >> ...
13 years, 4 months ago (2011-11-21 22:38:06 UTC) #19
gri
I'm all for the shortening from IsDirectory() to IsDir(). But in addition to iant's comments, ...
13 years, 4 months ago (2011-11-21 22:56:33 UTC) #20
nigeltao
On 22 November 2011 07:19, Brad Fitzpatrick <bradfitz@golang.org> wrote: > On Mon, Nov 21, 2011 ...
13 years, 4 months ago (2011-11-21 23:27:55 UTC) #21
r2
Modes aren't directories. That's what's bugging me. Files are. I don't have a good answer. ...
13 years, 4 months ago (2011-11-22 01:20:50 UTC) #22
gri
Seems like another indication that the IsDir() should be a method of FileInfo. - gri ...
13 years, 4 months ago (2011-11-22 01:28:08 UTC) #23
r2
On Nov 21, 2011, at 5:28 PM, Robert Griesemer wrote: > Seems like another indication ...
13 years, 4 months ago (2011-11-22 01:53:30 UTC) #24
r2
Since by far the most common use of an FI is to ask whether the ...
13 years, 4 months ago (2011-11-22 01:59:55 UTC) #25
rsc
PTAL > I understand the arguments about splitting the definition out, so I propose: > ...
13 years, 3 months ago (2011-11-28 18:53:21 UTC) #26
niemeyer
We should change archive/zip's FileHeader.Mode function to return a FileMode in a follow up CL, ...
13 years, 3 months ago (2011-11-28 19:07:14 UTC) #27
r
http://codereview.appspot.com/5416060/diff/5006/src/pkg/time/zoneinfo_plan9.go File src/pkg/time/zoneinfo_plan9.go (right): http://codereview.appspot.com/5416060/diff/5006/src/pkg/time/zoneinfo_plan9.go#newcode12 src/pkg/time/zoneinfo_plan9.go:12: //) d?
13 years, 3 months ago (2011-11-28 19:08:56 UTC) #28
r
other than the one name, LGTM http://codereview.appspot.com/5416060/diff/12001/src/pkg/os/types.go File src/pkg/os/types.go (right): http://codereview.appspot.com/5416060/diff/12001/src/pkg/os/types.go#newcode29 src/pkg/os/types.go:29: Same(other FileInfo) bool ...
13 years, 3 months ago (2011-11-28 19:13:34 UTC) #29
r
http://codereview.appspot.com/5416060/diff/12001/src/pkg/os/types.go File src/pkg/os/types.go (right): http://codereview.appspot.com/5416060/diff/12001/src/pkg/os/types.go#newcode21 src/pkg/os/types.go:21: IsDir() bool // abbreviation for IsDir() abbreviation for Mode().IsDir()
13 years, 3 months ago (2011-11-28 19:15:33 UTC) #30
rsc
On Mon, Nov 28, 2011 at 14:15, <r@golang.org> wrote: > // abbreviation for IsDir() > ...
13 years, 3 months ago (2011-11-28 19:15:59 UTC) #31
rsc
I agree about Same being too vague, but SameAs sounds almost as vague. How about ...
13 years, 3 months ago (2011-11-28 19:52:36 UTC) #32
r2
On Nov 28, 2011, at 11:52 AM, Russ Cox wrote: > I agree about Same ...
13 years, 3 months ago (2011-11-28 20:45:23 UTC) #33
gri
http://codereview.appspot.com/5416060/diff/12001/misc/dashboard/builder/main.go File misc/dashboard/builder/main.go (right): http://codereview.appspot.com/5416060/diff/12001/misc/dashboard/builder/main.go#newcode413 misc/dashboard/builder/main.go:413: return err == nil && s.Mode().IsDir() just s.IsDir() http://codereview.appspot.com/5416060/diff/12001/misc/dashboard/builder/main.go#newcode418 ...
13 years, 3 months ago (2011-11-28 21:06:24 UTC) #34
rsc
On Mon, Nov 21, 2011 at 15:51, <iant@golang.org> wrote: > http://codereview.appspot.com/5416060/diff/5006/src/pkg/os/file_unix.go#newcode149 > src/pkg/os/file_unix.go:149: // nil ...
13 years, 3 months ago (2011-11-30 16:33:40 UTC) #35
rsc
13 years, 3 months ago (2011-11-30 17:04:19 UTC) #36
*** Submitted as http://code.google.com/p/go/source/detail?r=7cdeacb20ef6 ***

os: new FileInfo, FileMode types + update tree

R=golang-dev, r, r, gri, bradfitz, iant, iant, nigeltao, n13m3y3r
CC=golang-dev
http://codereview.appspot.com/5416060
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b