Skip to main content

humanize

Returns a formatted string representing the directory name, or 'absolute path' if the directory name is empty.

def humanize(
dirname: string
) - > string

Converts a directory name into a human-readable string for display in logs or error messages.

Parameters

NameTypeDescription
dirnamestringThe directory path or name to be formatted for human-readable output.

Returns

TypeDescription
stringThe quoted directory name if it exists, otherwise the string 'absolute path' to represent the root or current context.