Do you need to have such a method?
```
recursiveAddResource(Resource res) {
  _filesMap[resource.fullPath] = resource;
  if (res is Container) {
    resource.getChildren().forEach((child) {
      recursiveAddResource(child);
    });
  }
}
```