Just wondering what the best way to check if a folder is empty on MacOs? Given that there always seems to be a “.DS_Store” file
is empty("folder") returns false even when there are no files in the folder.
The only way I can think of doing it is something like
readdir("File" == [".DS_Store"])
or I could try something like
filesize("Folder") < x
but I’m not sure what the appropriate x would be given there could be another small file in the folder. Just wondering if this was the correct approach?