fileExtension property

String? get fileExtension

Gets the file extension from this path (without dot)

Returns the file extension or null if not found

Example:

print('/path/to/document.pdf'.fileExtension); // "pdf"
print('/path/to/document.pdf'.fileExtensionWithDot); // ".pdf"

Implementation

String? get fileExtension => QFileInfoUtils.getExtension(this);