Availability:built-in
file_name_extension(?Base,
?Extension, ?Name)This predicate is used to add, remove or test filename extensions. The
main reason for its introduction is to deal with different filename
properties in a portable manner. If the file system is case-insensitive,
testing for an extension will also be done case-insensitive. Extension
may be specified with or without a leading dot (.
).
If an Extension is generated, it will not have a leading dot.