Ls#
Description#
Given a base_url and a url within that subtree, list - optionally recursively - all content in that subtree matching any of the given patterns or all if no pattern is given.
Given a URL, ls will return all the files in that subtree. This supports recursive listing and pattern matching.
For CLI options, run wrapp ls --help.
Python API Reference#
- async wrapp.ls(
- base_url: str,
- url: str,
- recursive: bool,
- pattern: List[str] | None = None,
- output_format: LsOutputFormat = LsOutputFormat.normal,
- print_to_console: bool = False,
- *,
- scheduler: SchedulerContext | None = None,
Given a base_url and an url within that subtree, list - optionally recursively - all content in that subtree matching any of the given patterns or all if no pattern is given. Specify print==False to collect the items in a result set instead
- Parameters:
base_url – The base url of all items that will be output as the first column if TSV format is specified (for the –file-list of catalog)
url – The URL to list
recursive – Whether to stop after the directory or do a recursive traversal
pattern – List of patterns used with fnmatch() to check if an item is part of the output set. At least one pattern should match for inclusion. Case sensitive!
output_format – One of the possible output formats
print_to_console – Whether to print the result instead of collecting and returning a list
scheduler – Optionally pre-constructed SchedulerContext. When calling many functions in a row make sure to pre-construct the scheduler.
- Returns:
The List of items discovered, empty if print is specified