GFileMonitor Test application:
Download and compile
https://gist.githubusercontent.com/dmatveev/2295597/raw/973da911a653550d762cffea20153db9ca52400b/gistfile1.c
gcc -o gfilemonitor gistfile1.c $(pkg-config --cflags glib-2.0) $(pkg-
config --libs glib-2.0) $(pkg-config --libs gio-2.0)
Now for a file or folder to watch, execute it with the path as argument:
(1) gfilemonitor test/first
(2) gfilemonitor test/second
touch test/first/a test/first/b
(1) Received event CREATED: (code 3), first file "a", second file "--"
Received event ATTRIBUTE_CHANGED: (code 4), first file "a", second file "--"
Received event CHANGES_DONE_HINT: (code 1), first file "a", second file "--"
Received event CREATED: (code 3), first file "b", second file "--"
Received event ATTRIBUTE_CHANGED: (code 4), first file "b", second file "--"
Received event CHANGES_DONE_HINT: (code 1), first file "b", second file "--"
Test case 1: Move a file to another folder
mv test/first/a to test/second/a
(1) Received event DELETED: (code 2), first file "a", second file "--"
(2) Received event CREATED: (code 3), first file "a", second file "--"
Received event CHANGES_DONE_HINT: (code 1), first file "a", second file "--"
Test case 2: Move a file in the same folder
Recreate test/first/a: touch test/first/a
mv test/first/a test/first/b
(1) Received event MOVED: (code 7), first file "a", second file "b"
(2) --
Test case 3: Copy a file to another folder (does not exist there)
cp test/first/a test/second/a
(1) --
(2) Received event CREATED: (code 3), first file "a", second file "--"
Received event CHANGES_DONE_HINT: (code 1), first file "a", second file "--"
Test case 4: Move a file using thunar cut & paste (target file does not exist)
(1) Received event DELETED: (code 2), first file "a", second file "--"
(2) Received event CREATED: (code 3), first file "a", second file "--"
Received event CHANGES_DONE_HINT: (code 1), first file "a", second file "--"
Test case 5: Move a file using thunar cut & paste (target file exists)
(1) Received event DELETED: (code 2), first file "a", second file "--"
(2) Received event CREATED: (code 3), first file ".goutputstream-97BSVX",
second file "--"
Received event CHANGES_DONE_HINT: (code 1), first file "a", second file "--"
Received event MOVED: (code 7), first file ".goutputstream-97BSVX", second
file "a"
Received event CHANGES_DONE_HINT: (code 1), first file "a", second file "--"
Received event ATTRIBUTE_CHANGED: (code 4), first file "a", second file "--"
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1252655
Title:
Thunar assigns date stamp of deleted file when previous (e.g.
original) copy of file copied or moved into directory
To manage notifications about this bug go to:
https://bugs.launchpad.net/thunar/+bug/1252655/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs