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

Side by Side Diff: runtime/bin/directory_macos.cc

Issue 12221086: Add string.h header file to directory listing implementations. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « runtime/bin/directory_linux.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "bin/directory.h" 5 #include "bin/directory.h"
6 6
7 #include <dirent.h> 7 #include <dirent.h>
8 #include <errno.h> 8 #include <errno.h>
9 #include <string.h>
9 #include <sys/param.h> 10 #include <sys/param.h>
10 #include <sys/stat.h> 11 #include <sys/stat.h>
11 #include <unistd.h> 12 #include <unistd.h>
12 13
13 #include "bin/file.h" 14 #include "bin/file.h"
14 #include "bin/platform.h" 15 #include "bin/platform.h"
15 16
16 class PathBuffer { 17 class PathBuffer {
17 public: 18 public:
18 PathBuffer() : length(0) { } 19 PathBuffer() : length(0) { }
(...skipping 380 matching lines...) Expand 10 before | Expand all | Expand 10 after
399 return DeleteRecursively(dir_name); 400 return DeleteRecursively(dir_name);
400 } 401 }
401 } 402 }
402 403
403 404
404 bool Directory::Rename(const char* path, const char* new_path) { 405 bool Directory::Rename(const char* path, const char* new_path) {
405 ExistsResult exists = Exists(path); 406 ExistsResult exists = Exists(path);
406 if (exists != EXISTS) return false; 407 if (exists != EXISTS) return false;
407 return (TEMP_FAILURE_RETRY(rename(path, new_path)) == 0); 408 return (TEMP_FAILURE_RETRY(rename(path, new_path)) == 0);
408 } 409 }
OLDNEW
« no previous file with comments | « runtime/bin/directory_linux.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698