I am running os.walk() on "C:\Users\confusedDev\Documents", I see ["My Music", "My Pictures"...] returned as subDirs but they are not actually being visited. After some research I found that they are actually junctions in Windows.
My understanding is that junction is a symlink points to directory, which gets ignored by default during os.walk(), but the following test has failed me
>>> os.path.islink("C:\\Users\\confusedDev\\Documents\\My Pictures")
False
hmm...how did os.walk() know that "C:\Users\confusedDev\Documents\My Pictures" is a symlink to "C:\Users\confusedDev\Pictures" and needed to be skipped? I want to call the same api...For now, my workaround logic simply assumes that if a directory is skipped by os.walk(), it is a junction
 
     
     
    