datalad.api.ls

datalad.api.ls(loc, recursive=False, fast=False, all_=False, long_=False, config_file=None, list_content=False, json=None)

List summary information about URLs and dataset(s)

ATM only s3:// URLs and datasets are supported

Examples

$ datalad ls s3://openfmri/tarballs/ds202 # to list S3 bucket $ datalad ls # to list current dataset

Parameters:
  • loc (sequence of str or None) -- URL or path to list, e.g. s3://...

  • recursive (bool, optional) -- recurse into subdirectories. [Default: False]

  • fast (bool, optional) -- only perform fast operations. Would be overridden by --all. [Default: False]

  • all (bool, optional) -- list all (versions of) entries, not e.g. only latest entries in case of S3. [Default: False]

  • long (bool, optional) -- list more information on entries (e.g. acl, urls in s3, annex sizes etc). [Default: False]

  • config_file (str or None, optional) -- path to config file which could help the 'ls'. E.g. for s3:// URLs could be some ~/.s3cfg file which would provide credentials. [Default: None]

  • list_content -- list also the content or only first 10 bytes (first10), or md5 checksum of an entry. Might require expensive transfer and dump binary output to your screen. Do not enable unless you know what you are after. [Default: False]

  • json -- metadata json of dataset for creating web user interface. display: prints jsons to stdout or file: writes each subdir metadata to json file in subdir of dataset or delete: deletes all metadata json files in dataset. [Default: None]