Please help me in solving this issue. I want to check the write
permissions on a directory on windows from my python script.
I tried to use os.access(dirpath, os.W_OK) to check whether the user
has write access or not, but it gives me incorrect result. It always
gives me False even if the user has write permission. Interestingly this
function works just fine on Linux platforms.
There is another way to check the write permissions by creating a
temporary file inside the directory & then removing it. Catch the
exception if create file is not allowed to decide the iswritable value.
But this is changing the last modification time (timestamp) of the
directory which is a critical issue for our application.
Please suggest a solution.
-------------- next part --------------
An HTML attachment was scrubbed...