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

Issue 9622001: Add the ability to get the current directory (Closed)

Created:
8 years, 9 months ago by Søren Gjesse
Modified:
8 years, 9 months ago
CC:
reviews_dartlang.org
Visibility:
Public.

Description

Add the ability to get the current directory Added constructor current to directory. Use like this: var cwd = Directory.current() R=ager@google.com BUG=dart:1793 TEST=tests/standalone/src/io/DirectoryTest.dart Committed: https://code.google.com/p/dart/source/detail?r=5087

Patch Set 1 #

Patch Set 2 : Minor change #

Patch Set 3 : Fix windows #

Patch Set 4 : Fix windows #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+44 lines, -0 lines) Patch
M runtime/bin/builtin_natives.cc View 1 chunk +1 line, -0 lines 0 comments Download
M runtime/bin/directory.h View 1 chunk +2 lines, -0 lines 0 comments Download
M runtime/bin/directory.cc View 1 chunk +11 lines, -0 lines 0 comments Download
M runtime/bin/directory.dart View 1 1 chunk +6 lines, -0 lines 1 comment Download
M runtime/bin/directory_impl.dart View 1 1 chunk +2 lines, -0 lines 0 comments Download
M runtime/bin/directory_posix.cc View 1 chunk +5 lines, -0 lines 0 comments Download
M runtime/bin/directory_win.cc View 1 2 3 1 chunk +9 lines, -0 lines 0 comments Download
M tests/standalone/src/io/DirectoryTest.dart View 2 chunks +8 lines, -0 lines 1 comment Download

Messages

Total messages: 3 (0 generated)
Søren Gjesse
8 years, 9 months ago (2012-03-07 12:52:42 UTC) #1
Mads Ager (google)
LGTM Too bad that the test is not more specific but I understand that it ...
8 years, 9 months ago (2012-03-07 13:12:21 UTC) #2
Bill Hesse
8 years, 9 months ago (2012-03-08 11:26:34 UTC) #3
https://chromiumcodereview.appspot.com/9622001/diff/4001/tests/standalone/src...
File tests/standalone/src/io/DirectoryTest.dart (right):

https://chromiumcodereview.appspot.com/9622001/diff/4001/tests/standalone/src...
tests/standalone/src/io/DirectoryTest.dart:359: Expect.equals("/",
current.path.substring(0, 1));
Why can't we test that Directory.current() is the same as
Directory(".").fullPath?

I always used Directory('.') for the current directory - Why isn't that
sufficient?  Or just Directory('.').fullPath()?

Powered by Google App Engine
This is Rietveld 408576698