Path.suffixes

string[] suffixes() const @safe

Return all suffixes (extensions) as an array, each including the leading dot.

Semantics:

  • "archive.tar.gz" → [".tar", ".gz"].
  • Dotfiles without any other dot (e.g., ".bashrc") → [] (no suffixes).
  • Names like ".env.local" → [".local"].

Returns

An array of suffixes, possibly empty.