read_ method

FutureOr<String?> read_()

Reads the contents of the File as String. Returns null if the File does not exist.

Implementation

FutureOr<String?> read_() {
  locks[clean(path)] ??= Lock();
  return locks[clean(path)]?.synchronized(() async {
    final file = File(clean(path));
    if (await file.exists_()) {
      return await file.readAsString();
    }
    return null;
  });
}