I want to write a python script that can run at the background and monitor the folders accessed. If a particular folder is accessed, it should ask for password. If the password is correct, the folder can be accessed or else not. But I do not know how to monitor for if a particular file is opened.If a log is generated for it, or if we can capture such a event.
I was going through the internet and I found something called "folder access event". But there is not much about it, or about how to access it.