So I noticed when running os.path.isdir()
on the subdirectories of my root directory, that it returned False
for any hidden/protected folders. Is there any reason for this, or is it a known bug? If not, is there any way to fix this?
For reference, below is the code I am running:
import os
for path in os.listdir("/"):
print path, os.path.isdir(path)
EDIT: this is the output for the above code
.DocumentRevisions-V100 False
.file False
.fseventsd False
.Spotlight-V100 False
.Trashes False
.vol False
Applications True
bin False
cores False
dev False
Developer False
etc False
home False
installer.failurerequests False
Library True
net False
Network False
opt False
private False
sbin False
System False
tmp False
User Information False
Users False
usr False
var False
Volumes False