Function that returns the file extension of the file. The file extension is always lowercase and includes the dot. This function is the equivalent of the method extension()
var myfile = new File("C:/myfile.txt"); var extension = extension(myfile.fsName);
Parameter ^ Data type ^ Required ^ Description ^
filename | string | Yes | The file name or absolute path of the file |
Value | Meaning |
---|---|
extension | The extension of the file, such as .txt |