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

Side by Side Diff: runtime/bin/file.h

Issue 105133004: Add File.copy(Sync) to dart:io. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fix permissions. Created 7 years 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/builtin_natives.cc ('k') | runtime/bin/file.cc » ('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) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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_FILE_H_ 5 #ifndef BIN_FILE_H_
6 #define BIN_FILE_H_ 6 #define BIN_FILE_H_
7 7
8 #include <stdlib.h> 8 #include <stdlib.h>
9 #include <string.h> 9 #include <string.h>
10 #include <stdio.h> 10 #include <stdio.h>
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 // (stdin, stout or stderr). 119 // (stdin, stout or stderr).
120 static File* OpenStdio(int fd); 120 static File* OpenStdio(int fd);
121 121
122 static bool Exists(const char* path); 122 static bool Exists(const char* path);
123 static bool Create(const char* path); 123 static bool Create(const char* path);
124 static bool CreateLink(const char* path, const char* target); 124 static bool CreateLink(const char* path, const char* target);
125 static bool Delete(const char* path); 125 static bool Delete(const char* path);
126 static bool DeleteLink(const char* path); 126 static bool DeleteLink(const char* path);
127 static bool Rename(const char* old_path, const char* new_path); 127 static bool Rename(const char* old_path, const char* new_path);
128 static bool RenameLink(const char* old_path, const char* new_path); 128 static bool RenameLink(const char* old_path, const char* new_path);
129 static bool Copy(const char* old_path, const char* new_path);
129 static off64_t LengthFromPath(const char* path); 130 static off64_t LengthFromPath(const char* path);
130 static void Stat(const char* path, int64_t* data); 131 static void Stat(const char* path, int64_t* data);
131 static time_t LastModified(const char* path); 132 static time_t LastModified(const char* path);
132 static char* LinkTarget(const char* pathname); 133 static char* LinkTarget(const char* pathname);
133 static bool IsAbsolutePath(const char* path); 134 static bool IsAbsolutePath(const char* path);
134 static char* GetCanonicalPath(const char* path); 135 static char* GetCanonicalPath(const char* path);
135 static const char* PathSeparator(); 136 static const char* PathSeparator();
136 static const char* StringEscapedPathSeparator(); 137 static const char* StringEscapedPathSeparator();
137 static Type GetType(const char* path, bool follow_links); 138 static Type GetType(const char* path, bool follow_links);
138 static Identical AreIdentical(const char* file_1, const char* file_2); 139 static Identical AreIdentical(const char* file_1, const char* file_2);
139 static StdioHandleType GetStdioHandleType(int fd); 140 static StdioHandleType GetStdioHandleType(int fd);
140 141
141 static FileOpenMode DartModeToFileMode(DartFileOpenMode mode); 142 static FileOpenMode DartModeToFileMode(DartFileOpenMode mode);
142 143
143 static CObject* ExistsRequest(const CObjectArray& request); 144 static CObject* ExistsRequest(const CObjectArray& request);
144 static CObject* CreateRequest(const CObjectArray& request); 145 static CObject* CreateRequest(const CObjectArray& request);
145 static CObject* DeleteRequest(const CObjectArray& request); 146 static CObject* DeleteRequest(const CObjectArray& request);
146 static CObject* RenameRequest(const CObjectArray& request); 147 static CObject* RenameRequest(const CObjectArray& request);
148 static CObject* CopyRequest(const CObjectArray& request);
147 static CObject* OpenRequest(const CObjectArray& request); 149 static CObject* OpenRequest(const CObjectArray& request);
148 static CObject* ResolveSymbolicLinksRequest(const CObjectArray& request); 150 static CObject* ResolveSymbolicLinksRequest(const CObjectArray& request);
149 static CObject* CloseRequest(const CObjectArray& request); 151 static CObject* CloseRequest(const CObjectArray& request);
150 static CObject* PositionRequest(const CObjectArray& request); 152 static CObject* PositionRequest(const CObjectArray& request);
151 static CObject* SetPositionRequest(const CObjectArray& request); 153 static CObject* SetPositionRequest(const CObjectArray& request);
152 static CObject* TruncateRequest(const CObjectArray& request); 154 static CObject* TruncateRequest(const CObjectArray& request);
153 static CObject* LengthRequest(const CObjectArray& request); 155 static CObject* LengthRequest(const CObjectArray& request);
154 static CObject* LengthFromPathRequest(const CObjectArray& request); 156 static CObject* LengthFromPathRequest(const CObjectArray& request);
155 static CObject* LastModifiedRequest(const CObjectArray& request); 157 static CObject* LastModifiedRequest(const CObjectArray& request);
156 static CObject* FlushRequest(const CObjectArray& request); 158 static CObject* FlushRequest(const CObjectArray& request);
(...skipping 19 matching lines...) Expand all
176 // FileHandle is an OS specific class which stores data about the file. 178 // FileHandle is an OS specific class which stores data about the file.
177 FileHandle* handle_; // OS specific handle for the file. 179 FileHandle* handle_; // OS specific handle for the file.
178 180
179 DISALLOW_COPY_AND_ASSIGN(File); 181 DISALLOW_COPY_AND_ASSIGN(File);
180 }; 182 };
181 183
182 } // namespace bin 184 } // namespace bin
183 } // namespace dart 185 } // namespace dart
184 186
185 #endif // BIN_FILE_H_ 187 #endif // BIN_FILE_H_
OLDNEW
« no previous file with comments | « runtime/bin/builtin_natives.cc ('k') | runtime/bin/file.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698