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

Side by Side Diff: pkg/analyzer/lib/file_system/physical_file_system.dart

Issue 1843473002: Sort analyzer sources (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Remove generated file and fix misplaced comments Created 4 years, 8 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
« no previous file with comments | « pkg/analyzer/lib/dart/ast/visitor.dart ('k') | pkg/analyzer/lib/src/generated/scanner.dart » ('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) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, 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 library analyzer.file_system.physical_file_system; 5 library analyzer.file_system.physical_file_system;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 import 'dart:core' hide Resource; 8 import 'dart:core' hide Resource;
9 import 'dart:io' as io; 9 import 'dart:io' as io;
10 10
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 String readAsStringSync() { 125 String readAsStringSync() {
126 try { 126 try {
127 io.File file = _entry as io.File; 127 io.File file = _entry as io.File;
128 return FileBasedSource.fileReadMode(file.readAsStringSync()); 128 return FileBasedSource.fileReadMode(file.readAsStringSync());
129 } on io.FileSystemException catch (exception) { 129 } on io.FileSystemException catch (exception) {
130 throw new FileSystemException(exception.path, exception.message); 130 throw new FileSystemException(exception.path, exception.message);
131 } 131 }
132 } 132 }
133 133
134 @override 134 @override
135 void writeAsBytesSync(List<int> bytes) {
136 try {
137 io.File file = _entry as io.File;
138 file.writeAsBytesSync(bytes);
139 } on io.FileSystemException catch (exception) {
140 throw new FileSystemException(exception.path, exception.message);
141 }
142 }
143
144 @override
145 Resource renameSync(String newPath) { 135 Resource renameSync(String newPath) {
146 try { 136 try {
147 io.File file = _entry as io.File; 137 io.File file = _entry as io.File;
148 io.File newFile = file.renameSync(newPath); 138 io.File newFile = file.renameSync(newPath);
149 return new _PhysicalFile(newFile); 139 return new _PhysicalFile(newFile);
150 } on io.FileSystemException catch (exception) { 140 } on io.FileSystemException catch (exception) {
151 throw new FileSystemException(exception.path, exception.message); 141 throw new FileSystemException(exception.path, exception.message);
152 } 142 }
143 }
144
145 @override
146 void writeAsBytesSync(List<int> bytes) {
147 try {
148 io.File file = _entry as io.File;
149 file.writeAsBytesSync(bytes);
150 } on io.FileSystemException catch (exception) {
151 throw new FileSystemException(exception.path, exception.message);
152 }
153 } 153 }
154 } 154 }
155 155
156 /** 156 /**
157 * A `dart:io` based implementation of [Folder]. 157 * A `dart:io` based implementation of [Folder].
158 */ 158 */
159 class _PhysicalFolder extends _PhysicalResource implements Folder { 159 class _PhysicalFolder extends _PhysicalResource implements Folder {
160 _PhysicalFolder(io.Directory directory) : super(directory); 160 _PhysicalFolder(io.Directory directory) : super(directory);
161 161
162 @override 162 @override
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
251 bool operator ==(other) { 251 bool operator ==(other) {
252 if (runtimeType != other.runtimeType) { 252 if (runtimeType != other.runtimeType) {
253 return false; 253 return false;
254 } 254 }
255 return path == other.path; 255 return path == other.path;
256 } 256 }
257 257
258 @override 258 @override
259 String toString() => path; 259 String toString() => path;
260 } 260 }
OLDNEW
« no previous file with comments | « pkg/analyzer/lib/dart/ast/visitor.dart ('k') | pkg/analyzer/lib/src/generated/scanner.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698