open static method

File? open(
  1. String? path
)

Implementation

static File? open(String? path) {
  if (path == null) return null;
  final file = File(path);
  try {
    file.parent.createSync(recursive: true);
    final header = 'createdAt: ${DateTime.now().toIso8601String()}\n';
    file.writeAsStringSync(header);
    _bytesByPath[file.path] = utf8.encode(header).length;
    _disabledPaths.remove(file.path);
    return file;
  } on FileSystemException {
    return null;
  }
}