datalad_next.iter_collections

Iterators for particular types of collections

Most importantly this includes different collections (or containers) for files, such as a file system directory, or an archive (also see the ls_file_collection command). However, this module is not per-se limited to file collections.

Most, if not all, implementation come in the form of a function that takes a collection identifier or a collection location (e.g., a file system path), and possibly some additional options. When called, an iterator is returned that produces collection items in the form of data class instances of a given type. The particular type can be different across different collections.

iter_annexworktree(path, *[, untracked, ...])

Companion to iter_gitworktree() for git-annex repositories

iter_dir(path, *[, fp])

Uses Path.iterdir() to iterate over a directory and reports content

iter_gitdiff(path, from_treeish, to_treeish, *)

Report differences between Git tree-ishes or tracked worktree content

iter_gitstatus(path, *[, untracked, ...])

Recursion mode 'no'

iter_gittree(path, treeish, *[, recursive])

Uses git ls-tree to report on a tree in a Git repository

iter_gitworktree(path, *[, untracked, ...])

Uses git ls-files to report on a work tree of a Git repository

iter_submodules(path)

Given a path, report all submodules of a repository worktree underneath

iter_tar(path, *[, fp])

Uses the standard library tarfile module to report on TAR archives

iter_zip(path, *[, fp])

Uses the standard library zipfile module to report on ZIP-files

TarfileItem(type, name, size[, mtime, mode, ...])

ZipfileItem(type, name, size[, mtime, mode, ...])

FileSystemItem(type, name, size[, mtime, ...])

FileSystemItemType(value)

Enumeration of file system path types

GitTreeItemType(value)

Enumeration of item types of Git trees

GitWorktreeItem(name[, gitsha, gittype])

GitWorktreeFileSystemItem(type, name, size)

GitDiffItem(name[, gitsha, gittype, ...])

GitTreeItem with "previous" property values given a state comparison

GitDiffStatus(value)

Enumeration of statuses for diff items

GitContainerModificationType(value)

An enumeration.