FilePath.extension

string extension()

Returns the file extension, if present, including the last dot.