airflow.providers.amazon.aws.utils.transfer

Utilities shared by Amazon transfer operators.

Functions

strip_overlapping_folder_markers(keys)

Drop trailing-slash keys that are strict prefixes of other listed keys.

Module Contents

airflow.providers.amazon.aws.utils.transfer.strip_overlapping_folder_markers(keys)[source]

Drop trailing-slash keys that are strict prefixes of other listed keys.

Treated as directory markers. A lone trailing-slash key with no overlap (e.g. lonely/) is preserved, and a non-slash key that happens to be a strict prefix of another (e.g. abc of abcdef) is also preserved. Returns (kept, dropped).

Was this entry helpful?