File.extension readonly property



The File.extension property returns a string representing the extension of the File, including the "." character.

Example

local file = sys.File("doc\\test.txt") -- outputs ".txt" print("file.extension: "..file.extension)