Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Directory completed copying event #14

Closed
jperry604 opened this issue May 4, 2011 · 5 comments
Closed

Directory completed copying event #14

jperry604 opened this issue May 4, 2011 · 5 comments

Comments

@jperry604
Copy link

I know this probably isn't part of the normal inotify functionality, but I had to implement a means of telling when a directory had finished copying.

http://code.google.com/p/archivematica/issues/detail?id=482

I created a second recursive watch directory, on the directory getting copied(being populated) to check for updates in the created directory, and timer class to act when modifications had stopped occurring.

http://code.google.com/p/archivematica/source/diff?spec=svn1364&r=1364&format=side&path=/trunk/src/MCPServer/lib/archivematicaMCP.py

I was curious if anyone else had faced this, and what solutions they came up with.

@fredrick
Copy link

@berwin22 I too add a second watch self.watch_manager.add_watch(event.pathname, EVENT_MASK, rec=True, auto_add=True) but usually stop at that. @seb-m Are watches not garbage collected somehow? What happens after a watched directory is deleted?

@seb-m
Copy link
Owner

seb-m commented Jun 24, 2011

Hi guys,

@wayoutmind are you thinking of this in the context of a moved directory? it's usually probably easier for a move than for a copy. Anyway I've never thought of this use case (using inotify as signal for copy completion), and I'm not sure inotify would be the right way of handling it. In first thought maybe inotify could be part of it but at least it seems to me it does not alleviate from the task of checking files integrity when it is assumed the copy ended. Maybe inotify could be used as a hint of when to check that files are rightly copied and then check that it's the case.

@fredrick
Copy link

Sorry @seb-m, yes I was thinking about this in the context of a moved directory.

@mkonecny
Copy link

mkonecny commented Nov 3, 2011

I have the same issue. Currently just adding a second watch as @wayoutmind described.

@seb-m
Copy link
Owner

seb-m commented Jul 6, 2014

Won't implement this feature.

@seb-m seb-m closed this as completed Jul 6, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants