I'm running a Jython 2.1 script on Windows 7 that calls an external program via os.system
. The script is run inside Jython embedded into a Java application.
This external program writes a file, but if it tries to write the file to a folder the current user does not have permissions for, the file never appears there. The external program does not notice that and returns as if the operation was successful.
How can I check from Jython if the current user has permissions for a certain folder? Could I even enable a UAC prompt so that the user can choose to write to a protected folder?