wojteklu / Watchdog

Class for logging excessive blocking on the main thread

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Fully downloaded file from Chrome is not observed. Only the .crdownload is observed.

rlgn opened this issue · comments

commented

('Was Created/Downloaded: ', '/Users/username/Downloads/LoadConf (1).pdf.crdownload')

`
import sys
import os
import time
from watchdog.observers import Observer
from watchdog.events import FileSystemEventHandler

class Event(FileSystemEventHandler):
def on_created(self, event):
print('Was Created/Downloaded: ', event.src_path)

if name == 'main':
path = sys.argv[1] if len(sys.argv) > 1 else '.'
event_handler = Event()
observer = Observer()
observer.schedule(event_handler, path, recursive=True)
observer.start()
try:
while True:
time.sleep(5)
print('Waiting for a change...')
except KeyboardInterrupt:
observer.stop()
observer.join()
`

commented

wrong project. please change the name of the project so I can comment on the REAL python watchdog:)