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
| Name | Type | Description |
|---|---|---|
| dirname | string | The directory path or name to be formatted for human-readable output. |
Returns
| Type | Description |
|---|---|
string | The quoted directory name if it exists, otherwise the string 'absolute path' to represent the root or current context. |