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

Issue 9316066: Implement recursive directory deletion. (Closed)

Created:
8 years, 10 months ago by Mads Ager (google)
Modified:
8 years, 10 months ago
Reviewers:
Bill Hesse
CC:
reviews_dartlang.org
Visibility:
Public.

Description

Implement recursive directory deletion. Additionally, make sure that the handler can be registered after the operation in file and directory implementation: dir.delete(); dir.deleteHandler = () => print('hest'); BUG= TEST= Committed: https://code.google.com/p/dart/source/detail?r=3892

Patch Set 1 #

Patch Set 2 : Windows implementation. #

Patch Set 3 : Fixing comment. #

Total comments: 18

Patch Set 4 : Address comments. #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+593 lines, -132 lines) Patch
M runtime/bin/builtin_natives.cc View 1 chunk +1 line, -1 line 0 comments Download
M runtime/bin/directory.h View 1 chunk +1 line, -1 line 0 comments Download
M runtime/bin/directory.cc View 1 chunk +4 lines, -2 lines 0 comments Download
M runtime/bin/directory.dart View 1 2 3 1 chunk +14 lines, -4 lines 0 comments Download
M runtime/bin/directory_impl.dart View 1 6 chunks +20 lines, -14 lines 0 comments Download
M runtime/bin/directory_posix.cc View 1 2 3 9 chunks +189 lines, -41 lines 2 comments Download
M runtime/bin/directory_win.cc View 1 2 3 11 chunks +156 lines, -39 lines 1 comment Download
M runtime/bin/file_impl.dart View 13 chunks +27 lines, -24 lines 0 comments Download
M tests/standalone/src/DirectoryTest.dart View 1 2 3 4 chunks +181 lines, -6 lines 0 comments Download

Messages

Total messages: 5 (0 generated)
Mads Ager (google)
8 years, 10 months ago (2012-02-02 15:48:07 UTC) #1
Bill Hesse
Note that PATH_MAX is just a limit on the behavior of certain APIs and function ...
8 years, 10 months ago (2012-02-02 17:24:39 UTC) #2
Mads Ager (google)
Thanks! Please take another look. http://codereview.chromium.org/9316066/diff/10/runtime/bin/directory.dart File runtime/bin/directory.dart (right): http://codereview.chromium.org/9316066/diff/10/runtime/bin/directory.dart#newcode70 runtime/bin/directory.dart:70: * and files in ...
8 years, 10 months ago (2012-02-03 11:48:54 UTC) #3
Bill Hesse
LGTM. http://codereview.chromium.org/9316066/diff/4002/runtime/bin/directory_posix.cc File runtime/bin/directory_posix.cc (right): http://codereview.chromium.org/9316066/diff/4002/runtime/bin/directory_posix.cc#newcode51 runtime/bin/directory_posix.cc:51: size_t written = snprintf(path + *path_length, I would ...
8 years, 10 months ago (2012-02-03 12:17:51 UTC) #4
Mads Ager (google)
8 years, 10 months ago (2012-02-03 12:37:11 UTC) #5
http://codereview.chromium.org/9316066/diff/4002/runtime/bin/directory_posix.cc
File runtime/bin/directory_posix.cc (right):

http://codereview.chromium.org/9316066/diff/4002/runtime/bin/directory_posix....
runtime/bin/directory_posix.cc:51: size_t written = snprintf(path +
*path_length,
On 2012/02/03 12:17:51, Bill Hesse wrote:
> I would consider moving the addition of PathSeparator from here to the sprintf
> calls in HandleDir and HandleFile and the DT_UNKNOWN case, and just using '/'.

> The result is not used for anything except later concatenation at these
places.

I would like to keep this as is. That way the code on all platforms is as close
to each other as it can be. If we can avoid doing things differently on the
platforms I'm in favor of that to make it easier to maintain.

Powered by Google App Engine
This is Rietveld 408576698