Tag: 拒绝访问

UnauthorizedAccessException:访问path是拒绝Ios

我知道这已经出现了一段时间,但我无法解决我尝试的任何解决scheme的错误。 我刚开始testing我的应用程序 – 将截图保存到ios设备代码是 – string GetiPhoneDocumentsPath() { string path = Application.dataPath.Substring(0, Application.dataPath.Length – 5); path = path.Substring(0, path.LastIndexOf("/")); return path + "/Documents/"; } string CreateImagesDirectory(string documentsPath) { //System.IO.File.SetAttributes (documentsPath, FileAttributes.Normal); string imagePath = documentsPath +"magicimages/"; if (Directory.Exists(imagePath)) {return imagePath;} DirectoryInfo t = new DirectoryInfo(documentsPath); //Directory.CreateDirectory(imagePath); t.CreateSubdirectory("magicimages"); System.IO.File.SetAttributes (imagePath, FileAttributes.Normal); return imagePath; } 要文件 Debug.Log("Do […]