How to implement confirmation of writing or reading in a folder?
📁 Advanced Python Topics, example
Hello! How can I monitor a folder in Python code?
For example: I monitor /home/igor/Desktop, and when any program tries to do something with a folder/file inside it, I receive a prompt: some program is trying to do something in such-and-such file/folder, and then I either deny or allow access.
I'm on CachyOS (Arch-based)
How can I do this?
As far as I remember, at the user level you can only subscribe to folder/file changes (inotify or systemd/path). To prohibit something, you need to interfere with the file system operation, and Python won't help you here.
Log in to leave an answer