Page 1 of 1
How to tell if a folder/file is hidden or not?
Posted: Fri Sep 22, 2006 12:11 am
by Sakesaru
How can I tell if a file/folder is hidden or not? I don't want to show hidden files or folders in an app I've been working on.
Posted: Fri Sep 22, 2006 12:46 am
by aaronhall
In Windows, I don't think that hidden files are exposed to PHP unless Windows has been set to display hidden files and folders. If they are, I don't know that PHP has any way of determining whether or not a file/folder is hidden.
Posted: Fri Sep 22, 2006 1:30 am
by Sakesaru
It seems they are exposed, setting explorer to show/hide hidden files doesn't make any difference. They still show up.
Posted: Fri Sep 22, 2006 6:58 am
by aaronhall
I wasn't thinking -- a file's hidden property doesn't belong to the file system, but to windows explorer. You could always do some research and hack into the registry via PHP's file API if that's where the property resides (not worth your time, and probably not possible). What you should do is put giant DELETE links next to /windows and /windows32 in your program -- that would solve a lot of problems.
Posted: Fri Sep 22, 2006 7:19 am
by Sakesaru
the app gives me/others from the household access to there home "my documents", cant get to win folders or anything else.
i just decided to have it block echo'ing stupid folders like save games, would have been more conveient for the future if it doesnt show hidden folders in the output. ill just have to hard code it in future. thanks anyway
