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

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

Issue 25720002: Add Directory.systemTemp getter to replace createSystemTemp(). (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Don't add an extra / to a directory ending in // Created 7 years, 2 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 | « pkg/docgen/test/single_library_test.dart ('k') | runtime/bin/directory.h » ('j') | 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 <stdlib.h> 5 #include <stdlib.h>
6 #include <stdio.h> 6 #include <stdio.h>
7 #include <string.h> 7 #include <string.h>
8 8
9 #include "include/dart_api.h" 9 #include "include/dart_api.h"
10 10
11 #include "platform/assert.h" 11 #include "platform/assert.h"
12 12
13 #include "bin/builtin.h" 13 #include "bin/builtin.h"
14 #include "bin/dartutils.h" 14 #include "bin/dartutils.h"
15 #include "bin/io_natives.h" 15 #include "bin/io_natives.h"
16 #include "bin/platform.h" 16 #include "bin/platform.h"
17 17
18 namespace dart { 18 namespace dart {
19 namespace bin { 19 namespace bin {
20 20
21 // Lists the native functions implementing basic functionality in 21 // Lists the native functions implementing basic functionality in
22 // standalone dart, such as printing, file I/O, and platform information. 22 // standalone dart, such as printing, file I/O, and platform information.
23 // Advanced I/O classes like sockets and process management are implemented 23 // Advanced I/O classes like sockets and process management are implemented
24 // using functions listed in io_natives.cc. 24 // using functions listed in io_natives.cc.
25 #define BUILTIN_NATIVE_LIST(V) \ 25 #define BUILTIN_NATIVE_LIST(V) \
26 V(Directory_Exists, 1) \ 26 V(Directory_Exists, 1) \
27 V(Directory_Create, 1) \ 27 V(Directory_Create, 1) \
28 V(Directory_Current, 0) \ 28 V(Directory_Current, 0) \
29 V(Directory_SetCurrent, 1) \ 29 V(Directory_SetCurrent, 1) \
30 V(Directory_CreateTemp, 2) \ 30 V(Directory_SystemTemp, 0) \
31 V(Directory_CreateTemp, 1) \
31 V(Directory_Delete, 2) \ 32 V(Directory_Delete, 2) \
32 V(Directory_Rename, 2) \ 33 V(Directory_Rename, 2) \
33 V(Directory_List, 3) \ 34 V(Directory_List, 3) \
34 V(File_Open, 2) \ 35 V(File_Open, 2) \
35 V(File_Exists, 1) \ 36 V(File_Exists, 1) \
36 V(File_Close, 1) \ 37 V(File_Close, 1) \
37 V(File_ReadByte, 1) \ 38 V(File_ReadByte, 1) \
38 V(File_WriteByte, 2) \ 39 V(File_WriteByte, 2) \
39 V(File_Read, 2) \ 40 V(File_Read, 2) \
40 V(File_ReadInto, 4) \ 41 V(File_ReadInto, 4) \
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 // Dart_StringToUTF8? We need to make sure not to swallow the 111 // Dart_StringToUTF8? We need to make sure not to swallow the
111 // interrupt. 112 // interrupt.
112 Platform::PrintBlocking(stdout, "%s\n", Dart_GetError(result)); 113 Platform::PrintBlocking(stdout, "%s\n", Dart_GetError(result));
113 } else { 114 } else {
114 Platform::PrintBlocking(stdout, "%.*s\n", static_cast<int>(length), chars); 115 Platform::PrintBlocking(stdout, "%.*s\n", static_cast<int>(length), chars);
115 } 116 }
116 } 117 }
117 118
118 } // namespace bin 119 } // namespace bin
119 } // namespace dart 120 } // namespace dart
OLDNEW
« no previous file with comments | « pkg/docgen/test/single_library_test.dart ('k') | runtime/bin/directory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698