Commit Graph

11 Commits

Author SHA1 Message Date
whesse@google.com fa78161fbf Remove use of strnlen on Mac OS, because pre-Lion versions don't have it.
BUG=

Review URL: https://codereview.chromium.org//12212090

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18251 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-08 12:55:32 +00:00
whesse@google.com 45e351e689 Add string.h header file to directory listing implementations.
BUG=

Review URL: https://codereview.chromium.org//12221086

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18248 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-08 12:21:56 +00:00
whesse@google.com 58e8b94008 Use a PathBuffer class in dart:io directory lister.
This simplifies the code, and avoids buffer overflow errors
by encapsulating snprintf.

BUG=

Review URL: https://codereview.chromium.org//12220034

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18247 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-08 11:58:12 +00:00
whesse@google.com 7f499abb04 Fix race condition in Directory.create.
BUG=https://code.google.com/p/dart/issues/detail?id=7679

Review URL: https://codereview.chromium.org//11794048

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16842 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-09 09:59:14 +00:00
ager@google.com ccced31671 Change Directory.create to not fail on existing directory with that name.
The new semantics is to ensure that a directory with that name
exists. There is no way to reliably guard a create call against
existing directories in an async program.

R=sgjesse@google.com
BUG=

Review URL: https://codereview.chromium.org//11175054

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@13933 260f80e4-7a28-3924-810f-c04153c831b5
2012-10-23 09:15:01 +00:00
jackpal@google.com e060b66a3e Add _android files for building DartVM on Android
Split directory_posix -> directory_(android|linux|macos)
  This allows us to cleanly make Android-specific changes to
  directory_android.cc

Copy all _linux files to _android files and edit as needed to account
for the differences between Linux and Android:

 + getcwd(0, NULL) doesn't work on Android, have to emulate
 + Android doesn't have a '/tmp' directory, have to emulate
 + Android doesn't provide mkdtemp(), have to emulate.
 + Small differences in the available system include files.
 + Use pthread_cond_timedwait_monotonic instead of
   pthread_condattr_setclock

Review URL: https://chromiumcodereview.appspot.com//10826233

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10613 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-13 23:06:52 +00:00
ager@google.com 953d2599c1 Add exists, create and delete to directory implementation on Linux and Mac.
All of the directory implementations on Linux and Mac are identical
and uncontroversial. Join the implementations in directory_posix for
now. I will split it into the two files again if it becomes necessary.

BUG=
TEST=

Review URL: http://codereview.chromium.org//8277033

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@432 260f80e4-7a28-3924-810f-c04153c831b5
2011-10-14 12:42:44 +00:00
ager@google.com c53c7097d0 Directory: implement recursive directory listing on Linux and Mac.
R=sgjesse@google.com
BUG=
TEST=

Review URL: http://codereview.chromium.org//8243005

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@363 260f80e4-7a28-3924-810f-c04153c831b5
2011-10-12 12:53:39 +00:00
ager@google.com 59135cc57b Clean up directory listing interface.
Remove open and close. A directory instance just holds a string
representing the path to the directory.

R=sgjesse@google.com
BUG=
TEST=

Review URL: http://codereview.chromium.org//8244001

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@362 260f80e4-7a28-3924-810f-c04153c831b5
2011-10-12 10:39:30 +00:00
ager@google.com 023fa46e48 Finish non-recursive synchronous directory listing on Linux and Mac.
Next steps: Testing, Windows support and using isolates to make
listing async.

We should probably change the API to not tie a Directory object
to a given OS directory structure. When spawning an isolate to
perform a listing operation, that will open the directory,
list its contents and close the directory. That way we can
do multiple listing operations with the same Directory object
without having interference.

R=sgjesse@google.com,iposva@google.com
BUG=
TEST=

Review URL: https://chromereviews.googleplex.com/3511020

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43 260f80e4-7a28-3924-810f-c04153c831b5
2011-10-05 14:33:49 +00:00
dgrove@google.com 4c0f559d23 Initial checkin.
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15 260f80e4-7a28-3924-810f-c04153c831b5
2011-10-05 05:20:07 +00:00