So, I know that I can list all the files and directories in my current folder using functions such as dir()or ls(), and I know that it was once specified, I can tell them about each other with the field isdir.
But is there a way to exclude directories from the very beginning and list only the files?
Even better, is there a way to exclude current directories .and parent directories ..- which will (of course) show each time - and list every other file and directory? Seriously, who uses ls(), wondering if there is one .?
source
share