OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 import 'dart:_mojo_services/mojo/files/types.mojom.dart' as types; | 5 import 'dart:_mojo_services/mojo/files/types.mojom.dart' as types; |
6 | 6 |
7 // | 7 // |
8 // Implementation of Directory, File, and RandomAccessFile for Mojo. | 8 // Implementation of Directory, File, and RandomAccessFile for Mojo. |
9 // | 9 // |
10 | 10 |
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
161 /* patch */ bool existsSync() => _onSyncOperation(); | 161 /* patch */ bool existsSync() => _onSyncOperation(); |
162 | 162 |
163 /* patch */ Stream<FileSystemEntity> list({bool recursive: false, | 163 /* patch */ Stream<FileSystemEntity> list({bool recursive: false, |
164 bool followLinks: true}) { | 164 bool followLinks: true}) { |
165 _DirectoryLister directoryLister = new _DirectoryLister(path, recursive); | 165 _DirectoryLister directoryLister = new _DirectoryLister(path, recursive); |
166 StreamController streamController = new StreamController(); | 166 StreamController streamController = new StreamController(); |
167 directoryLister.list(streamController); | 167 directoryLister.list(streamController); |
168 return streamController.stream; | 168 return streamController.stream; |
169 } | 169 } |
170 | 170 |
171 /* patch */ List listSync({bool recursive: false, | 171 /* patch */ List<FileSystemEntity> listSync({bool recursive: false, |
172 bool followLinks: true}) { | 172 bool followLinks: true}) { |
173 return _onSyncOperation(); | 173 return _onSyncOperation(); |
174 } | 174 } |
175 | 175 |
176 /* patch */ Future<FileStat> stat() { | 176 /* patch */ Future<FileStat> stat() { |
177 return FileStat.stat(path); | 177 return FileStat.stat(path); |
178 } | 178 } |
179 | 179 |
180 /* patch */ FileStat statSync() => _onSyncOperation(); | 180 /* patch */ FileStat statSync() => _onSyncOperation(); |
181 | 181 |
182 /* patch */ Future<Directory> rename(String newPath) async { | 182 /* patch */ Future<Directory> rename(String newPath) async { |
(...skipping 664 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
847 | 847 |
848 /* patch */ void lockSync( | 848 /* patch */ void lockSync( |
849 [FileLock mode = FileLock.EXCLUSIVE, int start = 0, int end]) { | 849 [FileLock mode = FileLock.EXCLUSIVE, int start = 0, int end]) { |
850 _onSyncOperation(); | 850 _onSyncOperation(); |
851 } | 851 } |
852 | 852 |
853 /* patch */ void unlockSync([int start = 0, int end]) { | 853 /* patch */ void unlockSync([int start = 0, int end]) { |
854 _onSyncOperation(); | 854 _onSyncOperation(); |
855 } | 855 } |
856 } | 856 } |
OLD | NEW |