I have a question regarding the isHidden() method when you use it on Mac. I have effectively hidden the file .test within this directory: /Users/somename/documents/.test . A dot hides a file/directory in Mac.
However, this returns false and I don't understand why:
When I use a dot (which hides files in mac) it returns true, all of the time, even if the file doesn't exist:
How can the last example also return true "if the file is available and hidden within the file system, the method will return true" (page 480). And most importantly, why doesn't the 1st piece of code return true?
On UNIX for example a file is considered to be hidden if its name begins with a period character ('.'). On Windows a file is considered hidden if it isn't a directory and the DOS hidden attribute is set
The macOS is based on UNIX.
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop