loadFile method

AFGeneratedFile loadFile(
  1. AFCommandContext context,
  2. List<String> path, {
  3. bool forModify = true,
})

Implementation

AFGeneratedFile loadFile(AFCommandContext context, List<String> path, {
  bool forModify = true
}) {
  final key = _keyForPath(path);
  final inMem = _findInMemory(key);
  if(inMem != null) {
    return inMem;
  }
  final result = AFGeneratedFile.fromPath(projectPath: path);
  if(forModify) {
    modified[key] = result;
  } else {
    read[key] = result;
  }

  return result;
}