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

Unified Diff: runtime/bin/file_patch.dart

Issue 11337019: Use patching for dart:io. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comments Created 8 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 side-by-side diff with in-line comments
Download patch
Index: runtime/bin/file_patch.dart
diff --git a/runtime/bin/file_patch.dart b/runtime/bin/file_patch.dart
new file mode 100644
index 0000000000000000000000000000000000000000..72127a524a3c87060c44ce0a5905f562cef66b93
--- /dev/null
+++ b/runtime/bin/file_patch.dart
@@ -0,0 +1,37 @@
+// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+patch class _FileUtils {
+ /* patch */ static SendPort _newServicePort() native "File_NewServicePort";
+}
+
+patch class _File {
+ /* patch */ static _exists(String name) native "File_Exists";
+ /* patch */ static _create(String name) native "File_Create";
+ /* patch */ static _delete(String name) native "File_Delete";
+ /* patch */ static _directory(String name) native "File_Directory";
+ /* patch */ static _lengthFromName(String name) native "File_LengthFromName";
+ /* patch */ static _lastModified(String name) native "File_LastModified";
+ /* patch */ static _open(String name, int mode) native "File_Open";
+ /* patch */ static int _openStdio(int fd) native "File_OpenStdio";
+ /* patch */ static _fullPath(String name) native "File_FullPath";
+}
+
+patch class _RandomAccessFile {
+ /* patch */ static int _close(int id) native "File_Close";
+ /* patch */ static _readByte(int id) native "File_ReadByte";
+ /* patch */ static _readList(int id, List<int> buffer, int offset, int bytes)
+ native "File_ReadList";
+ /* patch */ static _writeByte(int id, int value) native "File_WriteByte";
+ /* patch */ static _writeList(int id, List<int> buffer, int offset, int bytes)
+ native "File_WriteList";
+ /* patch */ static _writeString(int id, String string)
+ native "File_WriteString";
+ /* patch */ static _position(int id) native "File_Position";
+ /* patch */ static _setPosition(int id, int position)
+ native "File_SetPosition";
+ /* patch */ static _truncate(int id, int length) native "File_Truncate";
+ /* patch */ static _length(int id) native "File_Length";
+ /* patch */ static _flush(int id) native "File_Flush";
+}

Powered by Google App Engine
This is Rietveld 408576698