I download a file and placed it into a directory that I created with code on a Mac but it keeps giving me “Access is denied” error message whenever I try and move or copy that file to a different directory using Directory.Move(). I’m using Application.persistantDataPath, which work great on Windows, but not on a Mac. It also gives me the same problem when I create a iOS build. I have searched the net to find a solution, but non of the answers seems to work for me.
I cant be only one with this problem.
Directory.Move(Application.persistentDataPath + “/old”, Application.persistentDataPath + “/new”);
That worked for me on a Mac. Note that on Mac the app runs in a sandboxed environment. You should not expect to have access to the hard drive of the machine. See:
bundlePathStr += “Sounds” + Path.DirectorySeparatorChar;