Hi,
I would like to monitor a directory, only file1.txt should exists, all other should give an error.
Example.
/tmp/dir/file1.txt
I can do:
vfs.dir.count[/tmp/dir/]
if count is more than one, then give an error.
Is there another way? like:
1. Get the list of files inside the directory, then compare, if file is not equal to "file1.txt" then throw an error.
2. Get the count of files in the directory other than "file1.txt", count should be zero.
any help is appreciated.
Thanks.
I would like to monitor a directory, only file1.txt should exists, all other should give an error.
Example.
/tmp/dir/file1.txt
I can do:
vfs.dir.count[/tmp/dir/]
if count is more than one, then give an error.
Is there another way? like:
1. Get the list of files inside the directory, then compare, if file is not equal to "file1.txt" then throw an error.
2. Get the count of files in the directory other than "file1.txt", count should be zero.
any help is appreciated.
Thanks.
Comment