Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(87)

Issue 12638039: dart:io | Add "followLinks" optional parameter to Directory.list, let it return Link objects when f… (Closed)

Created:
7 years, 9 months ago by Bill Hesse
Modified:
7 years, 9 months ago
Reviewers:
nweiz, Søren Gjesse
CC:
reviews_dartlang.org
Visibility:
Public.

Description

dart:io | Add "followLinks" optional parameter to Directory.list, let it return Link objects when false. BUG=dartbug.com/7720 Committed: https://code.google.com/p/dart/source/detail?r=20370

Patch Set 1 #

Patch Set 2 : Fix windows. #

Patch Set 3 : Add macos and android implementations. #

Patch Set 4 : Remove stray changes from directory_test. #

Total comments: 5

Patch Set 5 : Switch from Stream.reduce to Completer in link_test. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+266 lines, -34 lines) Patch
M runtime/bin/builtin_natives.cc View 1 chunk +1 line, -1 line 0 comments Download
M runtime/bin/directory.h View 6 chunks +10 lines, -2 lines 0 comments Download
M runtime/bin/directory.cc View 5 chunks +24 lines, -2 lines 0 comments Download
M runtime/bin/directory_android.cc View 1 2 8 chunks +39 lines, -4 lines 0 comments Download
M runtime/bin/directory_linux.cc View 9 chunks +38 lines, -4 lines 0 comments Download
M runtime/bin/directory_macos.cc View 1 2 9 chunks +38 lines, -4 lines 0 comments Download
M runtime/bin/directory_patch.dart View 1 chunk +1 line, -1 line 0 comments Download
M runtime/bin/directory_win.cc View 1 9 chunks +28 lines, -3 lines 0 comments Download
M sdk/lib/_internal/compiler/implementation/lib/io_patch.dart View 1 chunk +1 line, -1 line 0 comments Download
M sdk/lib/io/directory.dart View 1 chunk +14 lines, -4 lines 0 comments Download
M sdk/lib/io/directory_impl.dart View 5 chunks +12 lines, -7 lines 0 comments Download
M sdk/lib/io/link.dart View 1 chunk +2 lines, -0 lines 0 comments Download
M tests/standalone/io/link_test.dart View 1 2 3 4 2 chunks +58 lines, -1 line 0 comments Download

Messages

Total messages: 5 (0 generated)
Bill Hesse
https://codereview.chromium.org/12638039/diff/7001/tests/standalone/io/link_test.dart File tests/standalone/io/link_test.dart (right): https://codereview.chromium.org/12638039/diff/7001/tests/standalone/io/link_test.dart#newcode111 tests/standalone/io/link_test.dart:111: followLinks: followLinks)) { Indentation. https://codereview.chromium.org/12638039/diff/7001/tests/standalone/io/link_test.dart#newcode119 tests/standalone/io/link_test.dart:119: baseDir.list(recursive: recursive, followLinks: ...
7 years, 9 months ago (2013-03-21 18:36:44 UTC) #1
Bill Hesse
7 years, 9 months ago (2013-03-22 00:34:01 UTC) #2
Søren Gjesse
LGTM! https://codereview.chromium.org/12638039/diff/7001/tests/standalone/io/link_test.dart File tests/standalone/io/link_test.dart (right): https://codereview.chromium.org/12638039/diff/7001/tests/standalone/io/link_test.dart#newcode119 tests/standalone/io/link_test.dart:119: baseDir.list(recursive: recursive, followLinks: followLinks).reduce( Run the same tests ...
7 years, 9 months ago (2013-03-22 08:07:35 UTC) #3
Bill Hesse
Committed patchset #5 manually as r20370 (presubmit successful).
7 years, 9 months ago (2013-03-22 09:56:31 UTC) #4
Bill Hesse
7 years, 9 months ago (2013-03-22 09:58:54 UTC) #5
Message was sent while issue was closed.
https://codereview.chromium.org/12638039/diff/7001/tests/standalone/io/link_t...
File tests/standalone/io/link_test.dart (right):

https://codereview.chromium.org/12638039/diff/7001/tests/standalone/io/link_t...
tests/standalone/io/link_test.dart:119: baseDir.list(recursive: recursive,
followLinks: followLinks).reduce(
On 2013/03/22 08:07:35, Søren Gjesse wrote:
> Run the same tests for listSync.

I do!  It is just so small you missed it - lines 109-115.

https://codereview.chromium.org/12638039/diff/7001/tests/standalone/io/link_t...
tests/standalone/io/link_test.dart:119: baseDir.list(recursive: recursive,
followLinks: followLinks).reduce(
On 2013/03/21 18:36:44, Bill Hesse wrote:
> Use Stream.reduce to call a function with each event, and complete a future
when
> done.

Switched to the more straightforward "create a Completer, complete it at the
right time" method.

Powered by Google App Engine
This is Rietveld 408576698