E
Egor Bolonev
hi all
i want my program to ignore ntfs links, but os.path.islink() isnt work as
i expect
print os.path.islink('''C:\Documents and Settings\åÇÏÒ\My
Documents\Scripts\Antiloop\'''')
outputs
False
far file manager said 'C:\Documents and Settings\åÇÏÒ\My
Documents\Scripts\Antiloop\' is link
how to detect ntfs links?
=program======
import os, os.path
def get_all_files(path):
if len(path) > 0:
if path[-1] == ':':
path=path+'\\'
try:
for i in os.listdir(path):
j = os.path.join(path, i)
if os.path.isdir(j) and not os.path.islink(j):
for ii in get_all_files(j):
yield ii
else:
yield j
exceptass
for i in get_all_files('c:'):
print i
==============
i want my program to ignore ntfs links, but os.path.islink() isnt work as
i expect
print os.path.islink('''C:\Documents and Settings\åÇÏÒ\My
Documents\Scripts\Antiloop\'''')
outputs
False
far file manager said 'C:\Documents and Settings\åÇÏÒ\My
Documents\Scripts\Antiloop\' is link
how to detect ntfs links?
=program======
import os, os.path
def get_all_files(path):
if len(path) > 0:
if path[-1] == ':':
path=path+'\\'
try:
for i in os.listdir(path):
j = os.path.join(path, i)
if os.path.isdir(j) and not os.path.islink(j):
for ii in get_all_files(j):
yield ii
else:
yield j
exceptass
for i in get_all_files('c:'):
print i
==============