folderWithExamplesApi property

Folder? folderWithExamplesApi
latefinal

The directory that contains examples/api, null if not found.

Implementation

late final Folder? folderWithExamplesApi = () {
  var file = resourceProvider.getFile(filePath);
  for (var parent in file.parent.withAncestors) {
    var apiFolder = parent
        .getChildAssumingFolder('examples')
        .getChildAssumingFolder('api');
    if (apiFolder.exists) {
      return parent;
    }
  }
  return null;
}();