fileSize() and isDir() functions