This is not possible, as it is a security risk allowing the site code to set any value on the machine.
In addition, you can never be sure that a directory exists. What if I am on a Mac? My stuff is in ~/Pictures . What if I installed Windows on D:\ ?
source share