Directory.isempty readonly property
The Directory.isempty property returns a boolean value indicating if the folder is empty (don't contains any file/directory) or not. If the folder don't exists, the property returns false
Example
local tempdir = sys.Directory(sys.env.temp)
if tempdir.isempty then
print("Your temporary directory is not empty, you should think about to emptying it")
else
print("Your temporary directory is empty")
end