| OLD | NEW |
| 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 #ifndef BIN_DIRECTORY_H_ | 5 #ifndef BIN_DIRECTORY_H_ |
| 6 #define BIN_DIRECTORY_H_ | 6 #define BIN_DIRECTORY_H_ |
| 7 | 7 |
| 8 #include "bin/builtin.h" | 8 #include "bin/builtin.h" |
| 9 #include "bin/dartutils.h" | 9 #include "bin/dartutils.h" |
| 10 #include "bin/native_service.h" | |
| 11 #include "platform/globals.h" | 10 #include "platform/globals.h" |
| 12 #include "platform/thread.h" | 11 #include "platform/thread.h" |
| 13 | 12 |
| 14 | 13 |
| 15 namespace dart { | 14 namespace dart { |
| 16 namespace bin { | 15 namespace bin { |
| 17 | 16 |
| 18 enum ListType { | 17 enum ListType { |
| 19 kListFile = 0, | 18 kListFile = 0, |
| 20 kListDirectory = 1, | 19 kListDirectory = 1, |
| (...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 267 }; | 266 }; |
| 268 | 267 |
| 269 static void List(DirectoryListing* listing); | 268 static void List(DirectoryListing* listing); |
| 270 static ExistsResult Exists(const char* path); | 269 static ExistsResult Exists(const char* path); |
| 271 static char* Current(); | 270 static char* Current(); |
| 272 static bool SetCurrent(const char* path); | 271 static bool SetCurrent(const char* path); |
| 273 static bool Create(const char* path); | 272 static bool Create(const char* path); |
| 274 static char* CreateTemp(const char* const_template); | 273 static char* CreateTemp(const char* const_template); |
| 275 static bool Delete(const char* path, bool recursive); | 274 static bool Delete(const char* path, bool recursive); |
| 276 static bool Rename(const char* path, const char* new_path); | 275 static bool Rename(const char* path, const char* new_path); |
| 277 static Dart_Port GetServicePort(); | 276 |
| 277 static CObject* CreateRequest(const CObjectArray& request); |
| 278 static CObject* DeleteRequest(const CObjectArray& request); |
| 279 static CObject* ExistsRequest(const CObjectArray& request); |
| 280 static CObject* CreateTempRequest(const CObjectArray& request); |
| 281 static CObject* ListStartRequest(const CObjectArray& request); |
| 282 static CObject* ListNextRequest(const CObjectArray& request); |
| 283 static CObject* ListStopRequest(const CObjectArray& request); |
| 284 static CObject* RenameRequest(const CObjectArray& request); |
| 278 | 285 |
| 279 private: | 286 private: |
| 280 static NativeService directory_service_; | |
| 281 | |
| 282 DISALLOW_ALLOCATION(); | 287 DISALLOW_ALLOCATION(); |
| 283 DISALLOW_IMPLICIT_CONSTRUCTORS(Directory); | 288 DISALLOW_IMPLICIT_CONSTRUCTORS(Directory); |
| 284 }; | 289 }; |
| 285 | 290 |
| 286 } // namespace bin | 291 } // namespace bin |
| 287 } // namespace dart | 292 } // namespace dart |
| 288 | 293 |
| 289 #endif // BIN_DIRECTORY_H_ | 294 #endif // BIN_DIRECTORY_H_ |
| OLD | NEW |