Main.HiddenFiles.ishidden
— Functionishidden(f::AbstractString)
Check if a file or directory is hidden.
On Unix-like systems, a file or directory is hidden if it starts with a full stop/period (U+002e
). On Windows systems, this function will parse file attributes to determine if the given file or directory is hidden.
Directory references (i.e., .
or ..
) are always hidden. To check if the underlying path is hidden, you should run ishidden
on its realpath
.
On Unix-like systems, in order to correctly determine if the file begins with a full stop, we must first expand the path to its real path.
On operating systems deriving from BSD (i.e., *BSD, macOS), this function will also check the st_flags
field from stat
to check if the UF_HIDDEN
flag has been set.
There may be some UNIX-specific system directories in macOS that are not yet classified as hidden (#18).
Mount points on ZFS are not yet classified as hidden (#20).