Skip to main content

Module helpers

Module helpers 

Source
Expand description

Shared utility helpers for migration-aware command behavior.

Constants§

TRASHINFO_EXTENSION
File extension used by trash info files.
TRASHINFO_TIME_FORMAT
Deletion date format commonly used by Trash info metadata.

Functions§

build_unique_basename
Builds a deterministic, namespaced filename for trash files.
canonical_or_relaxed
Returns a normalized path by resolving . and .. segments where possible.
format_duration
Produces a human readable timeout string from duration.
parse_trash_datetime
Parses an ISO-like deletion date string into a UTC datetime.
print_size
Human readable size rendering shared across commands.
sanitize_user_path
Returns a user-safe, trimmed path string that can be used in logs and messages.
serialize_system_time
Serializes a UTC datetime into the repository-standard trash format.