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

Issue 12533008: dart:io | Add FileSystemEntity.typeSync to test for symbolic links. (Closed)

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

Description

dart:io | Add FileSystemEntity.typeSync to test for symbolic links. BUG=dartbug.com/8935 Committed: https://code.google.com/p/dart/source/detail?r=19608

Patch Set 1 #

Patch Set 2 : Add error-checking for arguments. Disable Windows implementation. #

Total comments: 16

Patch Set 3 : Address comments. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+184 lines, -9 lines) Patch
M runtime/bin/builtin_natives.cc View 1 chunk +1 line, -0 lines 0 comments Download
M runtime/bin/file.h View 2 chunks +8 lines, -0 lines 0 comments Download
M runtime/bin/file.cc View 1 1 chunk +20 lines, -0 lines 0 comments Download
M runtime/bin/file_android.cc View 1 1 chunk +16 lines, -0 lines 0 comments Download
M runtime/bin/file_linux.cc View 1 chunk +16 lines, -0 lines 0 comments Download
M runtime/bin/file_macos.cc View 1 1 chunk +16 lines, -0 lines 0 comments Download
A + runtime/bin/file_system_entity_patch.dart View 1 chunk +3 lines, -7 lines 0 comments Download
M runtime/bin/file_win.cc View 1 chunk +20 lines, -0 lines 0 comments Download
M runtime/bin/io_sources.gypi View 1 chunk +1 line, -0 lines 0 comments Download
M sdk/lib/_internal/compiler/implementation/lib/io_patch.dart View 1 chunk +6 lines, -0 lines 0 comments Download
M sdk/lib/io/file_system_entity.dart View 1 2 2 chunks +43 lines, -0 lines 0 comments Download
M tests/standalone/io/file_system_links_test.dart View 1 chunk +34 lines, -2 lines 0 comments Download

Messages

Total messages: 8 (0 generated)
Bill Hesse
The Windows implementation should be pretty easy, and follow within a day, and similarly the ...
7 years, 9 months ago (2013-03-06 16:36:07 UTC) #1
Søren Gjesse
lgtm https://codereview.chromium.org/12533008/diff/2001/sdk/lib/io/file_system_entity.dart File sdk/lib/io/file_system_entity.dart (right): https://codereview.chromium.org/12533008/diff/2001/sdk/lib/io/file_system_entity.dart#newcode38 sdk/lib/io/file_system_entity.dart:38: static FileSystemEntityType typeSync(String path, {bool followLinks: true}) Use ...
7 years, 9 months ago (2013-03-06 17:47:32 UTC) #2
Bob Nystrom
Just skimmed the API but this looks like a big step in the right direction. ...
7 years, 9 months ago (2013-03-06 19:02:52 UTC) #3
Bill Hesse
https://codereview.chromium.org/12533008/diff/2001/runtime/bin/file_win.cc File runtime/bin/file_win.cc (right): https://codereview.chromium.org/12533008/diff/2001/runtime/bin/file_win.cc#newcode284 runtime/bin/file_win.cc:284: // if (S_ISLNK(entry_info.st_mode)) return File::kIsLink; The Windows implementation will ...
7 years, 9 months ago (2013-03-07 09:53:12 UTC) #4
Bill Hesse
Committed patchset #3 manually as r19608 (presubmit successful).
7 years, 9 months ago (2013-03-07 11:18:55 UTC) #5
Søren Gjesse
Still lgtm https://codereview.chromium.org/12533008/diff/2001/sdk/lib/io/file_system_entity.dart File sdk/lib/io/file_system_entity.dart (right): https://codereview.chromium.org/12533008/diff/2001/sdk/lib/io/file_system_entity.dart#newcode11 sdk/lib/io/file_system_entity.dart:11: static const NOT_FOUND = const FileSystemEntityType._internal(3); On ...
7 years, 9 months ago (2013-03-07 11:33:30 UTC) #6
Mads Ager (google)
On 2013/03/06 19:02:52, Bob Nystrom wrote: > Just skimmed the API but this looks like ...
7 years, 9 months ago (2013-03-07 11:41:11 UTC) #7
Bob Nystrom
7 years, 9 months ago (2013-03-12 21:05:11 UTC) #8
Message was sent while issue was closed.
On 2013/03/07 11:41:11, Mads Ager wrote:
> On 2013/03/06 19:02:52, Bob Nystrom wrote:
> > Just skimmed the API but this looks like a big step in the right direction.
> > 
> > Once we can detect links, will dart:io be able to work with them? If I do
new
> > File("path/to/broken/symlink").deleteSync(), will that work?
> 
> I don't see a direct answer to this part: We are going to add a Link class
that
> should be used to work with links. So the code to delete a broken link would
be
> 
> new Link('path/to/broken/symlink').deleteSync();

SGTM!

Powered by Google App Engine
This is Rietveld 408576698