[Interest] Watching files two ways

Sensei senseiwa at gmail.com
Mon Mar 24 16:53:33 CET 2014


On 3/24/14, 2:50pm, alexander golks wrote:
>> Right now I can detect if a file changes, and it's ok. However, can I
>> track if a file *comes back*?
>>
>> For instance, if I rename a watched file "a.txt" and rename it to
>> "b.txt", I get the slot running. Can I detect if the "b.txt" gets
>> renamed back to "a.txt"?
>
> i haven't tried, but perhaps watching the parent directory itself will help.


Yes, it does the trick. It's trickier than I've hoped because I have to 
search for the changed file in the directory, but I can live with that.


Thanks!




More information about the Interest mailing list