OLD | NEW |
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, 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 cli_util; | 5 library cli_util; |
6 | 6 |
7 import 'dart:io'; | 7 import 'dart:io'; |
8 | 8 |
9 import 'package:path/path.dart' as p; | 9 import 'package:path/path.dart' as p; |
10 import 'package:which/which.dart'; | 10 import 'package:which/which.dart'; |
(...skipping 48 matching lines...) Loading... |
59 | 59 |
60 return null; | 60 return null; |
61 } | 61 } |
62 | 62 |
63 bool _isSdkDir(Directory dir) => _joinFile(dir, ['version']).existsSync(); | 63 bool _isSdkDir(Directory dir) => _joinFile(dir, ['version']).existsSync(); |
64 | 64 |
65 File _joinFile(Directory dir, List<String> files) { | 65 File _joinFile(Directory dir, List<String> files) { |
66 String pathFragment = files.join(Platform.pathSeparator); | 66 String pathFragment = files.join(Platform.pathSeparator); |
67 return new File("${dir.path}${Platform.pathSeparator}${pathFragment}"); | 67 return new File("${dir.path}${Platform.pathSeparator}${pathFragment}"); |
68 } | 68 } |
OLD | NEW |