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

Unified Diff: runtime/bin/file_patch.dart

Issue 3001963002: [dart:io] Namespaces for file IO (Closed)
Patch Set: Fuchsia fix Created 3 years, 4 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
« no previous file with comments | « runtime/bin/file_macos.cc ('k') | runtime/bin/file_system_entity_patch.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/file_patch.dart
diff --git a/runtime/bin/file_patch.dart b/runtime/bin/file_patch.dart
index 014299ea69fff3f77a66e005cd19b16d87879b48..301cfe0436bc8cec7c4835946aa209a16a47ae7e 100644
--- a/runtime/bin/file_patch.dart
+++ b/runtime/bin/file_patch.dart
@@ -5,37 +5,45 @@
@patch
class _File {
@patch
- static _exists(String path) native "File_Exists";
+ static _exists(_Namespace namespace, String path) native "File_Exists";
@patch
- static _create(String path) native "File_Create";
+ static _create(_Namespace namespace, String path) native "File_Create";
@patch
- static _createLink(String path, String target) native "File_CreateLink";
+ static _createLink(_Namespace namespace, String path, String target)
+ native "File_CreateLink";
@patch
- static _linkTarget(String path) native "File_LinkTarget";
+ static _linkTarget(_Namespace namespace, String path) native "File_LinkTarget";
@patch
- static _deleteNative(String path) native "File_Delete";
+ static _deleteNative(_Namespace namespace, String path) native "File_Delete";
@patch
- static _deleteLinkNative(String path) native "File_DeleteLink";
+ static _deleteLinkNative(_Namespace namespace, String path)
+ native "File_DeleteLink";
@patch
- static _rename(String oldPath, String newPath) native "File_Rename";
+ static _rename(_Namespace namespace, String oldPath, String newPath)
+ native "File_Rename";
@patch
- static _renameLink(String oldPath, String newPath) native "File_RenameLink";
+ static _renameLink(_Namespace namespace, String oldPath, String newPath)
+ native "File_RenameLink";
@patch
- static _copy(String oldPath, String newPath) native "File_Copy";
+ static _copy(_Namespace namespace, String oldPath, String newPath)
+ native "File_Copy";
@patch
- static _lengthFromPath(String path) native "File_LengthFromPath";
+ static _lengthFromPath(_Namespace namespace, String path)
+ native "File_LengthFromPath";
@patch
- static _lastModified(String path) native "File_LastModified";
+ static _lastModified(_Namespace namespace, String path)
+ native "File_LastModified";
@patch
- static _setLastModified(String path, int millis)
+ static _setLastModified(_Namespace namespace, String path, int millis)
native "File_SetLastModified";
@patch
- static _lastAccessed(String path) native "File_LastAccessed";
+ static _lastAccessed(_Namespace namespace, String path)
+ native "File_LastAccessed";
@patch
- static _setLastAccessed(String path, int millis)
+ static _setLastAccessed(_Namespace namespace, String path, int millis)
native "File_SetLastAccessed";
@patch
- static _open(String path, int mode) native "File_Open";
+ static _open(_Namespace namespace, String path, int mode) native "File_Open";
@patch
static int _openStdio(int fd) native "File_OpenStdio";
}
@@ -134,7 +142,8 @@ class _FileSystemWatcher {
}
var pathId;
try {
- pathId = _watchPath(_id, _path, _events, _recursive);
+ pathId = _watchPath(
+ _id, _Namespace._namespace, _path, _events, _recursive);
} catch (e) {
_broadcastController
.addError(new FileSystemException("Failed to watch path", _path, e));
@@ -290,7 +299,8 @@ class _FileSystemWatcher {
static int _initWatcher() native "FileSystemWatcher_InitWatcher";
static void _closeWatcher(int id) native "FileSystemWatcher_CloseWatcher";
- static int _watchPath(int id, String path, int events, bool recursive)
+ static int _watchPath(
+ int id, _Namespace namespace, String path, int events, bool recursive)
native "FileSystemWatcher_WatchPath";
static void _unwatchPath(int id, int path_id)
native "FileSystemWatcher_UnwatchPath";
« no previous file with comments | « runtime/bin/file_macos.cc ('k') | runtime/bin/file_system_entity_patch.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698