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

Issue 10639004: Add .fromPath constructors to File and Directory. (Closed)

Created:
8 years, 6 months ago by Bill Hesse
Modified:
8 years, 6 months ago
CC:
reviews_dartlang.org
Visibility:
Public.

Description

Add .fromPath constructors to File and Directory. BUG= TEST= Committed: https://code.google.com/p/dart/source/detail?r=9024

Patch Set 1 #

Total comments: 8

Patch Set 2 : Address comments. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+43 lines, -4 lines) Patch
M runtime/bin/directory.dart View 1 chunk +10 lines, -3 lines 0 comments Download
M runtime/bin/directory_impl.dart View 1 chunk +2 lines, -1 line 0 comments Download
M runtime/bin/file.dart View 1 1 chunk +5 lines, -0 lines 0 comments Download
M runtime/bin/file_impl.dart View 1 chunk +3 lines, -0 lines 0 comments Download
M tests/standalone/io/directory_test.dart View 1 2 chunks +10 lines, -0 lines 0 comments Download
M tests/standalone/io/file_test.dart View 2 chunks +13 lines, -0 lines 0 comments Download

Messages

Total messages: 4 (0 generated)
Bill Hesse
https://chromiumcodereview.appspot.com/10639004/diff/1/tests/standalone/io/directory_test.dart File tests/standalone/io/directory_test.dart (right): https://chromiumcodereview.appspot.com/10639004/diff/1/tests/standalone/io/directory_test.dart#newcode324 tests/standalone/io/directory_test.dart:324: Directory current = new Directory.fromPath(new Path('.')); Remove current - ...
8 years, 6 months ago (2012-06-21 16:02:58 UTC) #1
Mads Ager (google)
LGTM https://chromiumcodereview.appspot.com/10639004/diff/1/runtime/bin/file.dart File runtime/bin/file.dart (right): https://chromiumcodereview.appspot.com/10639004/diff/1/runtime/bin/file.dart#newcode32 runtime/bin/file.dart:32: * Create a File object from a Path ...
8 years, 6 months ago (2012-06-22 07:44:36 UTC) #2
Søren Gjesse
lgtm https://chromiumcodereview.appspot.com/10639004/diff/1/runtime/bin/directory.dart File runtime/bin/directory.dart (right): https://chromiumcodereview.appspot.com/10639004/diff/1/runtime/bin/directory.dart#newcode21 runtime/bin/directory.dart:21: Directory.fromPath(Path path); I know that it would be ...
8 years, 6 months ago (2012-06-22 08:06:12 UTC) #3
Bill Hesse
8 years, 6 months ago (2012-06-22 10:35:33 UTC) #4
https://chromiumcodereview.appspot.com/10639004/diff/1/runtime/bin/directory....
File runtime/bin/directory.dart (right):

https://chromiumcodereview.appspot.com/10639004/diff/1/runtime/bin/directory....
runtime/bin/directory.dart:21: Directory.fromPath(Path path);
I'd like to make breaking changes once we are more confident about how usable
the Path library is.

On 2012/06/22 08:06:12, Søren Gjesse wrote:
> I know that it would be a breaking change, but shouldn't we consider to have
> this one be the default one and rename the other to Directory.fromString. Or
> just get rid of it, as one can always do
> 
>   new Directory(new Path(str))

https://chromiumcodereview.appspot.com/10639004/diff/1/runtime/bin/file.dart
File runtime/bin/file.dart (right):

https://chromiumcodereview.appspot.com/10639004/diff/1/runtime/bin/file.dart#...
runtime/bin/file.dart:32: * Create a File object from a Path object.  Uses
Path.toNativePath().
On 2012/06/22 07:44:36, Mads Ager wrote:
> Remove the 'Uses Path.toNativePath().' part of the comment?

Done.

https://chromiumcodereview.appspot.com/10639004/diff/1/tests/standalone/io/di...
File tests/standalone/io/directory_test.dart (right):

https://chromiumcodereview.appspot.com/10639004/diff/1/tests/standalone/io/di...
tests/standalone/io/directory_test.dart:324: Directory current = new
Directory.fromPath(new Path('.'));
On 2012/06/21 16:02:58, Bill Hesse wrote:
> Remove current - it is not used.

Done.

Powered by Google App Engine
This is Rietveld 408576698