lsst.obs.base
19.0.0-64-gf672fef+2
|
Public Member Functions | |
def | __init__ (self) |
def | add (self, PathElementHandler handler) |
Iterator[PathElementHandler] | __iter__ (self) |
def | scan (self, str path, Mapping[DatasetType, List[FileDataset]] datasets, *Log log, Callable[[DataCoordinate], bool] predicate) |
An object that uses `PathElementHandler` instances to process the files and subdirectories in a directory tree.
Definition at line 151 of file scanner.py.
def lsst.obs.base.gen2to3.repoWalker.scanner.DirectoryScanner.__init__ | ( | self | ) |
Definition at line 155 of file scanner.py.
Iterator[PathElementHandler] lsst.obs.base.gen2to3.repoWalker.scanner.DirectoryScanner.__iter__ | ( | self | ) |
Iterate over all handlers.
Definition at line 174 of file scanner.py.
def lsst.obs.base.gen2to3.repoWalker.scanner.DirectoryScanner.add | ( | self, | |
PathElementHandler | handler | ||
) |
Add a new handler to the scanner. Parameters ---------- handler : `PathElementHandler` The handler to be added.
Definition at line 161 of file scanner.py.
def lsst.obs.base.gen2to3.repoWalker.scanner.DirectoryScanner.scan | ( | self, | |
str | path, | ||
Mapping[DatasetType, List[FileDataset]] | datasets, | ||
*Log | log, | ||
Callable[[DataCoordinate], bool] | predicate | ||
) |
Process a directory. Parameters ---------- path : `str` Full path to the directory to be processed. datasets : `dict` [`DatasetType`, `list` [`FileDataset`] ] Dictionary that found datasets should be added to. log : `Log`, optional Log to use to report warnings and debug information. predicate : `~collections.abc.Callable` A callable taking a single `DataCoordinate` argument and returning `bool`, indicating whether that (Gen3) data ID represents one that should be included in the scan.
Definition at line 180 of file scanner.py.