Editing
File monitor
(section)
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
=Simplified File Watching Interface= ==Use cases== * Watch for source code changes and rerun unit tests ** Shell command, should be cancelable ** Needs to be filterable (ie .go, .cpp, .hpp) * Watch for kernel/nvidia driver changes and copy to EFI ==Requirements== * Must support cancelable shell command. * Functions/GoRoutines can't be canceled. * Different editors have differnt save strategies. * Most changes result in multiple events (touch for example CREAT+CHMOD). * Should support a delay (could stop spamming changes). * Delay should be reset each time a new action occurs. Modification time? Might not help if you copy an old file onto a new one... ==Example== file: /usr/lib/modules/linux.so cancelable: yes delay: 10ms action: cp /usr/lib/modules/linux.so /boot/efi/blah.so file: /src/program cancelable: yes delay: 10ms action: go test ./... file: /mnt/storage/large_files cancelable: no delay: 10ms action: go func {SomeLongRunningAction()} ==fsnotify event examples== ===touch a=== 2016/04/09 11:59:47 Event: "/home/hegemon/programming/ansible/a": CREATE 2016/04/09 11:59:47 Event: "/home/hegemon/programming/ansible/a": CHMOD ===vim :wq=== 2016/04/09 12:00:19 Event: "/home/hegemon/programming/ansible/4913": CREATE 2016/04/09 12:00:19 Event: "/home/hegemon/programming/ansible/a": RENAME 2016/04/09 12:00:19 Event: "/home/hegemon/programming/ansible/a": CREATE 2016/04/09 12:00:19 Event: "/home/hegemon/programming/ansible/a": WRITE 2016/04/09 12:00:19 Event: "/home/hegemon/programming/ansible/a": CHMOD ===atom (save existing file):=== 2016/04/09 13:32:59 Event: "/home/hegemon/programming/ansible/a": WRITE 2016/04/09 13:32:59 Event: "/home/hegemon/programming/ansible/a": WRITE ===mv b a=== 2016/04/09 13:31:24 Event: "/home/hegemon/programming/ansible/b": RENAME 2016/04/09 13:31:24 Event: "/home/hegemon/programming/ansible/a": CREATE
Summary:
Please note that all contributions to Hegemon Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Hegemon Wiki:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Navigation menu
Personal tools
Not logged in
Talk
Contributions
Log in
Namespaces
Page
Discussion
English
Views
Read
Edit
Edit source
View history
More
Search
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Tools
What links here
Related changes
Special pages
Page information