[Mono-dev] FileSystemWatcher on Linux
pablosantosluac at terra.es
pablosantosluac at terra.es
Mon Dec 29 14:30:54 EST 2008
Andrés,
I'm interested on using Inotify to actually track moves and renames (not
exactly the way in which FileSystemWatcher works now).
I see at ReadEvent implementation that the fields are actually composed
"manually" (I mean, reading byte by byte and handling big and little
endian issues) instead of using a binary reader... is there a reason for
that?
Also, why "cookie" is skipped? It can help tracking moves
Thanks
pablo
Andrés G. Aragoneses escribió:
> Hey Pablo, do a quick search on bugzilla, there are some open bugs about
> FSW, maybe you're facing them ;)
>
> Andrés
>
> pablosantosluac at terra.es wrote:
>
>> Hi,
>>
>> There's a variable in InotifyWatcher named new_name_needed which is not
>> used since revision 63309 and avoids "renames" to work correctly.
>>
>> When a move a file (rename) I get a "moved_from" and "moved_to" pair of
>> events, but they are not correctly processed since "moved_to" always
>> have "new_name_needed" to false.
>>
>> pablosantosluac at terra.es escribió:
>>
>>> Ok, a bit of more info
>>>
>>> I set the "directory" to be /home/pablo but I'm only getting "rename"
>>> notifications *inside* /home/pablo/somethingelse, never when the ops are
>>> directly in /home/pablo
>>>
>>> I'll take a look at the code
>>>
>>> pablo
>>>
>>> pablosantosluac at terra.es escribió:
>>>
>>>
>>>> Hi,
>>>>
>>>> I'm running a test with FileSystemWatcher on linux. My problem is:
>>>>
>>>> - I never get "rename" events but "removed" and "added" event pairs
>>>>
>>>> - I also get a huge number of "modified" events for files I think no one
>>>> is touching (I'm seeing that on a huge number of source files on my
>>>> workspace, files that are not being edited (unless they're being acessed
>>>> by "beagle" ... :-P, so just forget about this one)
>>>>
>>>> Also, one question: Inotify is able to *correctly* report moved files,
>>>> isn't it? I mean, not like on windows where the *sad* FileSystemWatcher
>>>> implementation is not able to track moved files, right? So, wouldn't it
>>>> be better to modify the InotifyWatcher implementation to correctly fill
>>>> moved events (I know it won't be the *standard* way, but it would be
>>>> better, wouldn't it?)
>>>>
>>>> _______________________________________________
>>>> Mono-osx mailing list
>>>> Mono-osx at lists.ximian.com
>>>> http://lists.ximian.com/mailman/listinfo/mono-osx
>>>>
>>>>
>>>> _______________________________________________
>>>> Mono-devel-list mailing list
>>>> Mono-devel-list at lists.ximian.com
>>>> http://lists.ximian.com/mailman/listinfo/mono-devel-list
>>>>
>>>>
>>>>
>>>>
>>> _______________________________________________
>>> Mono-devel-list mailing list
>>> Mono-devel-list at lists.ximian.com
>>> http://lists.ximian.com/mailman/listinfo/mono-devel-list
>>>
>>>
>>>
>
> _______________________________________________
> Mono-devel-list mailing list
> Mono-devel-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-devel-list
>
>
More information about the Mono-devel-list
mailing list