openString function

String openString(
  1. String path
)

Reads the contents of the path file as String. If files doesn't exists, returns empty String.

Implementation

String openString(String path) {
  // if (useDataDir && !path.startsWith('data/')) {
  //   path = 'data/master/$path';
  // }
  var f = File(path);
  if (f.existsSync()) return f.readAsStringSync();
  print('openString(): ${f.uri} does not exists.');
  return '';
}