I have been trying to setup a file watcher which searches for a file pattern such /tmp/test_*, where * can be any integer value.
My requirement is:
-- The file watcher looks for a file of the pattern defined above
-- It finds the file and performs a job related to the file and deletes that file
-- It restarts again automatically and performs the same job again
One solution that I could find was by creating 2 file watchers with a circular dependency. But that seems to be a forced method. Please help me find a better solution for this.
Thanks.