I use pyinotify to view a folder when files are created in it. And when certain files are created, I want to move them. The problem is that as soon as the file is created (obviously), my program tries to move it, even before it is completely written to disk.
Is there any way to make pyinotify until the file is completely written to disk before telling me that it was created? Or is there any simple way, after I received the notification, to make python wait to move it until it is written?
python linux file pyinotify
Falmarri
source share