| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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 part of dart.io; | 5 part of dart.io; |
| 6 | 6 |
| 7 /** | 7 /** |
| 8 * [Link] objects are references to filesystem links. | 8 * [Link] objects are references to filesystem links. |
| 9 * | 9 * |
| 10 */ | 10 */ |
| (...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 123 */ | 123 */ |
| 124 String targetSync(); | 124 String targetSync(); |
| 125 } | 125 } |
| 126 | 126 |
| 127 | 127 |
| 128 class _Link extends FileSystemEntity implements Link { | 128 class _Link extends FileSystemEntity implements Link { |
| 129 final String path; | 129 final String path; |
| 130 | 130 |
| 131 SendPort _fileService; | 131 SendPort _fileService; |
| 132 | 132 |
| 133 _Link(String this.path); | 133 _Link(String this.path) { |
| 134 if (path is! String) { |
| 135 throw new ArgumentError('${Error.safeToString(path)} ' |
| 136 'is not a String'); |
| 137 } |
| 138 } |
| 139 |
| 134 | 140 |
| 135 _Link.fromPath(Path inputPath) : path = inputPath.toNativePath(); | 141 _Link.fromPath(Path inputPath) : path = inputPath.toNativePath(); |
| 136 | 142 |
| 137 String toString() => "Link: '$path'"; | 143 String toString() => "Link: '$path'"; |
| 138 | 144 |
| 139 Future<bool> exists() => FileSystemEntity.isLink(path); | 145 Future<bool> exists() => FileSystemEntity.isLink(path); |
| 140 | 146 |
| 141 bool existsSync() => FileSystemEntity.isLinkSync(path); | 147 bool existsSync() => FileSystemEntity.isLinkSync(path); |
| 142 | 148 |
| 143 Future<FileStat> stat() => FileStat.stat(path); | 149 Future<FileStat> stat() => FileStat.stat(path); |
| (...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 309 if (path != null) { | 315 if (path != null) { |
| 310 sb.write(", path = $path"); | 316 sb.write(", path = $path"); |
| 311 } | 317 } |
| 312 } | 318 } |
| 313 return sb.toString(); | 319 return sb.toString(); |
| 314 } | 320 } |
| 315 final String message; | 321 final String message; |
| 316 final String path; | 322 final String path; |
| 317 final OSError osError; | 323 final OSError osError; |
| 318 } | 324 } |
| OLD | NEW |