I have a directory structure like:
-project
-dart
-src
-test
-mytest.dart
-test_data
-testdata.csv
And in the mytest.dart I want to access testdata.csv, what is the best way to get the absolute and platform independent path to testdata.csv from mytest.dart?
This works, but maybe there is a better way?:
Directory projectRoot = new Directory.fromUri(Platform.script).parent.parent.parent;
String testDataPath = path.absolute(projectRoot.path, 'test_data', 'testdata.csv');