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

Side by Side Diff: runtime/bin/file_patch.dart

Issue 833623004: Add support for file locking (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fix Windows test Created 5 years, 11 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
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 patch class _File { 5 patch class _File {
6 /* patch */ static _exists(String path) native "File_Exists"; 6 /* patch */ static _exists(String path) native "File_Exists";
7 /* patch */ static _create(String path) native "File_Create"; 7 /* patch */ static _create(String path) native "File_Create";
8 /* patch */ static _createLink(String path, String target) 8 /* patch */ static _createLink(String path, String target)
9 native "File_CreateLink"; 9 native "File_CreateLink";
10 /* patch */ static _linkTarget(String path) native "File_LinkTarget"; 10 /* patch */ static _linkTarget(String path) native "File_LinkTarget";
(...skipping 20 matching lines...) Expand all
31 native "File_ReadInto"; 31 native "File_ReadInto";
32 /* patch */ static _writeByte(int id, int value) native "File_WriteByte"; 32 /* patch */ static _writeByte(int id, int value) native "File_WriteByte";
33 /* patch */ static _writeFrom(int id, List<int> buffer, int start, int end) 33 /* patch */ static _writeFrom(int id, List<int> buffer, int start, int end)
34 native "File_WriteFrom"; 34 native "File_WriteFrom";
35 /* patch */ static _position(int id) native "File_Position"; 35 /* patch */ static _position(int id) native "File_Position";
36 /* patch */ static _setPosition(int id, int position) 36 /* patch */ static _setPosition(int id, int position)
37 native "File_SetPosition"; 37 native "File_SetPosition";
38 /* patch */ static _truncate(int id, int length) native "File_Truncate"; 38 /* patch */ static _truncate(int id, int length) native "File_Truncate";
39 /* patch */ static _length(int id) native "File_Length"; 39 /* patch */ static _length(int id) native "File_Length";
40 /* patch */ static _flush(int id) native "File_Flush"; 40 /* patch */ static _flush(int id) native "File_Flush";
41 /* patch */ static _lock(int id, int lock, int start, int end)
42 native "File_Lock";
41 } 43 }
42 44
43 45
44 class _WatcherPath { 46 class _WatcherPath {
45 final int pathId; 47 final int pathId;
46 final String path; 48 final String path;
47 final int events; 49 final int events;
48 int count = 0; 50 int count = 0;
49 _WatcherPath(this.pathId, this.path, this.events); 51 _WatcherPath(this.pathId, this.path, this.events);
50 } 52 }
(...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after
359 void _pathWatchedEnd() { 361 void _pathWatchedEnd() {
360 _subscription.cancel(); 362 _subscription.cancel();
361 _controller.close(); 363 _controller.close();
362 } 364 }
363 } 365 }
364 366
365 367
366 Uint8List _makeUint8ListView(Uint8List source, int offsetInBytes, int length) { 368 Uint8List _makeUint8ListView(Uint8List source, int offsetInBytes, int length) {
367 return new Uint8List.view(source.buffer, offsetInBytes, length); 369 return new Uint8List.view(source.buffer, offsetInBytes, length);
368 } 370 }
OLDNEW
« no previous file with comments | « runtime/bin/file_macos.cc ('k') | runtime/bin/file_win.cc » ('j') | sdk/lib/io/file.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698