getChild method

  1. @override
Resource getChild(
  1. String relPath
)
override

Return an existing child Resource with the given relPath. Return a not existing File if no such child exist.

Implementation

@override
Resource getChild(String relPath) {
  final path = p.join(directory.path, relPath);
  final child = fileSystem.file(path);

  if (child.existsSync()) {
    return child.toAnalyzerFile();
  }

  return fileSystem.directory(path).toAnalyzerFolder(fileSystem);
}