Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 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 | |
| 3 // BSD-style license that can be found in the LICENSE file. | |
| 4 | |
| 5 /** | |
| 6 * A utility function for test and tools that compensates (at least for very | |
| 7 * simple cases) for file-dependent programs being run from different | |
| 8 * directories. | |
| 9 */ | |
| 10 #library('data_directory'); | |
| 11 | |
| 12 #import('dart:io'); | |
| 13 | |
| 14 get dataDirectory { | |
| 15 var current = new Directory.current().path; | |
| 16 if (new RegExp('.*/test').hasMatch(current)) return '../data/datess/'; | |
|
Emily Fortuna
2012/09/04 20:14:42
is "data/datess" what you intended?
Alan Knight
2012/09/04 23:39:03
Done.
| |
| 17 if (new RegExp('.*/intl').hasMatch(current)) return 'data/dates/'; | |
|
Emily Fortuna
2012/09/04 20:14:42
Use Path separator from Platform library here?
Alan Knight
2012/09/04 23:39:03
Done.
| |
| 18 return 'pkg/intl/data/dates/'; | |
| 19 } | |
| OLD | NEW |