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

Issue 6972047: code review 6972047: os: provide access to file LastAccessTime and CreationT... (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
11 years, 4 months ago by brainman
Modified:
11 years, 2 months ago
Reviewers:
CC:
bradfitz, rsc, golang-dev
Visibility:
Public.

Description

os: provide access to file LastAccessTime and CreationTime on windows Fixes issue 4569.

Patch Set 1 #

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

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

Total comments: 6

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

Total comments: 2

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

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

Total comments: 4

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

Total comments: 2

Patch Set 8 : diff -r b53def5b161e https://go.googlecode.com/hg/ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+130 lines, -380 lines) Patch
M src/pkg/os/file_windows.go View 1 2 3 4 5 1 chunk +10 lines, -5 lines 0 comments Download
M src/pkg/os/stat_darwin.go View 1 2 3 4 5 6 1 chunk +3 lines, -3 lines 0 comments Download
M src/pkg/os/stat_freebsd.go View 1 2 3 4 5 6 1 chunk +3 lines, -3 lines 0 comments Download
M src/pkg/os/stat_linux.go View 1 2 3 4 5 6 1 chunk +3 lines, -3 lines 0 comments Download
M src/pkg/os/stat_netbsd.go View 1 2 3 4 5 6 1 chunk +3 lines, -3 lines 0 comments Download
M src/pkg/os/stat_openbsd.go View 1 2 3 4 5 6 1 chunk +3 lines, -3 lines 0 comments Download
M src/pkg/os/stat_plan9.go View 1 2 3 4 5 6 1 chunk +3 lines, -3 lines 0 comments Download
M src/pkg/os/stat_windows.go View 1 2 3 4 5 6 chunks +20 lines, -129 lines 0 comments Download
M src/pkg/os/types.go View 1 2 3 4 5 6 2 chunks +3 lines, -16 lines 0 comments Download
M src/pkg/os/types_notwin.go View 1 2 3 4 5 6 2 chunks +2 lines, -108 lines 0 comments Download
M src/pkg/os/types_windows.go View 1 2 3 4 5 6 7 1 chunk +77 lines, -104 lines 0 comments Download

Messages

Total messages: 23
brainman
Hello golang-dev@googlegroups.com, I'd like you to review this change to https://go.googlecode.com/hg/
11 years, 4 months ago (2012-12-20 05:19:43 UTC) #1
bradfitz
https://codereview.appspot.com/6972047/diff/5001/src/pkg/syscall/syscall_windows.go File src/pkg/syscall/syscall_windows.go (right): https://codereview.appspot.com/6972047/diff/5001/src/pkg/syscall/syscall_windows.go#newcode873 src/pkg/syscall/syscall_windows.go:873: // Stat_t is an invented structure on Windows, but ...
11 years, 4 months ago (2012-12-20 19:32:57 UTC) #2
brainman
https://codereview.appspot.com/6972047/diff/5001/src/pkg/syscall/syscall_windows.go File src/pkg/syscall/syscall_windows.go (right): https://codereview.appspot.com/6972047/diff/5001/src/pkg/syscall/syscall_windows.go#newcode873 src/pkg/syscall/syscall_windows.go:873: // Stat_t is an invented structure on Windows, but ...
11 years, 4 months ago (2012-12-21 04:44:16 UTC) #3
brainman
Hello golang-dev@googlegroups.com, bradfitz@golang.org (cc: golang-dev@googlegroups.com), Please take another look.
11 years, 4 months ago (2012-12-21 04:44:33 UTC) #4
bradfitz
Leaving for Russ. One more nitpick comment, though: https://codereview.appspot.com/6972047/diff/11001/src/pkg/syscall/syscall_windows.go File src/pkg/syscall/syscall_windows.go (right): https://codereview.appspot.com/6972047/diff/11001/src/pkg/syscall/syscall_windows.go#newcode881 src/pkg/syscall/syscall_windows.go:881: sync.Mutex ...
11 years, 4 months ago (2012-12-21 05:13:43 UTC) #5
brainman
https://codereview.appspot.com/6972047/diff/11001/src/pkg/syscall/syscall_windows.go File src/pkg/syscall/syscall_windows.go (right): https://codereview.appspot.com/6972047/diff/11001/src/pkg/syscall/syscall_windows.go#newcode881 src/pkg/syscall/syscall_windows.go:881: sync.Mutex // guards fi Good catch. Fixed.
11 years, 4 months ago (2012-12-21 05:39:34 UTC) #6
brainman
Hello golang-dev@googlegroups.com, bradfitz@golang.org (cc: golang-dev@googlegroups.com), Please take another look.
11 years, 4 months ago (2012-12-21 05:39:52 UTC) #7
brainman
ping
11 years, 3 months ago (2013-01-07 02:05:32 UTC) #8
rsc
I am concerned about the delayed fetch of metadata when using one of these syscall.Stat_t. ...
11 years, 3 months ago (2013-01-07 04:42:34 UTC) #9
brainman
On 2013/01/07 04:42:34, rsc wrote: > I am concerned about the delayed fetch of metadata ...
11 years, 3 months ago (2013-01-09 03:58:10 UTC) #10
rsc
My suggestion is to use Win32FileAttributeData in the sys field, and then to change os.SameFile ...
11 years, 3 months ago (2013-01-09 19:47:30 UTC) #11
brainman
Hello bradfitz@golang.org, rsc@golang.org (cc: golang-dev@googlegroups.com), Please take another look.
11 years, 3 months ago (2013-01-14 05:38:12 UTC) #12
bradfitz
https://codereview.appspot.com/6972047/diff/21001/src/pkg/os/types_notwin.go File src/pkg/os/types_notwin.go (right): https://codereview.appspot.com/6972047/diff/21001/src/pkg/os/types_notwin.go#newcode27 src/pkg/os/types_notwin.go:27: func samefile(fs1, fs2 *fileStat) bool { samefile calls sameFile? ...
11 years, 3 months ago (2013-01-15 17:45:20 UTC) #13
brainman
https://codereview.appspot.com/6972047/diff/21001/src/pkg/os/types_notwin.go File src/pkg/os/types_notwin.go (right): https://codereview.appspot.com/6972047/diff/21001/src/pkg/os/types_notwin.go#newcode27 src/pkg/os/types_notwin.go:27: func samefile(fs1, fs2 *fileStat) bool { I know, I ...
11 years, 3 months ago (2013-01-16 03:09:44 UTC) #14
rsc
I'm a little lost. Why do we have SameFile calling samefile calling sameFile instead of ...
11 years, 3 months ago (2013-01-18 22:42:45 UTC) #15
brainman
unix sameFile needs access to (*fileStat).sys while windows one needs access to fileStat. samefile does ...
11 years, 3 months ago (2013-01-18 23:26:30 UTC) #16
rsc
How about having just the current SameFile and the existing sameFile but with different arguments: ...
11 years, 3 months ago (2013-01-18 23:29:00 UTC) #17
brainman
On 2013/01/18 23:29:00, rsc wrote: > How about having just the current SameFile and the ...
11 years, 3 months ago (2013-01-18 23:33:43 UTC) #18
rsc
I think that we should have (bold is changed): func SameFile(fi1, fi2 FileInfo) bool { ...
11 years, 3 months ago (2013-01-22 18:29:05 UTC) #19
brainman
I realized what to do after my last email (brain freezes are common with me). ...
11 years, 3 months ago (2013-01-22 21:08:25 UTC) #20
brainman
Hello bradfitz@golang.org, rsc@golang.org (cc: golang-dev@googlegroups.com), Please take another look.
11 years, 2 months ago (2013-01-30 06:33:02 UTC) #21
rsc
LGTM https://codereview.appspot.com/6972047/diff/35001/src/pkg/os/types_windows.go File src/pkg/os/types_windows.go (right): https://codereview.appspot.com/6972047/diff/35001/src/pkg/os/types_windows.go#newcode92 src/pkg/os/types_windows.go:92: panic(e) Library routines do not panic under reasonable ...
11 years, 2 months ago (2013-01-30 16:03:10 UTC) #22
brainman
11 years, 2 months ago (2013-01-31 06:18:08 UTC) #23
*** Submitted as https://code.google.com/p/go/source/detail?r=77ff44d04248 ***

os: provide access to file LastAccessTime and CreationTime on windows

Fixes issue 4569.

R=bradfitz, rsc
CC=golang-dev
https://codereview.appspot.com/6972047

https://codereview.appspot.com/6972047/diff/35001/src/pkg/os/types_windows.go
File src/pkg/os/types_windows.go (right):

https://codereview.appspot.com/6972047/diff/35001/src/pkg/os/types_windows.go...
src/pkg/os/types_windows.go:92: panic(e)
On 2013/01/30 16:03:10, rsc wrote:
> Library routines do not panic under reasonable circumstances. Doing a Stat +
> Remove + SameFile will trigger this. Returning false is fine.

Done.
Sign in to reply to this message.

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