다음 코드는 반드시 교체해야합니다.
for action, file in results:
if (file != 'file1.txt' and file != 'file2.txt'): #here you cut the check of the files you don't want.
full_filename = os.path.join (path_to_watch, file)
if not os.path.exists (full_filename):
file_type = "<deleted>"
elif os.path.isdir (full_filename):
file_type = 'folder'
else:
file_type = 'file'
yield (file_type, full_filename, ACTIONS.get (action, "Unknown"))
:이 코드에 의해
for action, file in results:
full_filename = os.path.join (path_to_watch, file)
if not os.path.exists (full_filename):
file_type = "<deleted>"
elif os.path.isdir (full_filename):
file_type = 'folder'
else:
file_type = 'file'
yield (file_type, full_filename, ACTIONS.get (action, "Unknown"))