GetFileType

This function gets the file type of a file.

Syntax

Parameters

Returns

If the specified path if a file, FileSystem::File is returned. If the specified path is a directory, FileSystem::Dir is returned. If the file does not exist, 0 is returned.

Example

--Create a file
local path = "MyFile.txt"
FileSystem:CreateFile(path)

--This will print the value of FileSystem::File
System:Print((FileSystem:GetFileType(path)))