DDGDataCache_Swift icon indicating copy to clipboard operation
DDGDataCache_Swift copied to clipboard

创建缓存文件失败

Open mzx-699 opened this issue 3 years ago • 0 comments

环境swift5 + xcode13.1 + macos 11.6.1 代码

DDGDataCache.save_asyncJsonResponseToCacheFile(json.dictionaryObject as AnyObject, URL: url, path: path, subPath: subpath) { succ in
            if succ {
                print("day weather 保存成功")
            } else {
                print("day weather 保存失败")
            }
        }

报错 create cache directory failed, error = %@ Error Domain=NSCocoaErrorDomain Code=642 "You can’t save the file “dayWeather” because the volume “Macintosh HD - 数据” is read only." UserInfo={NSFilePath=/dayWeather, NSUnderlyingError=0x6000031eff60 {Error Domain=NSPOSIXErrorDomain Code=30 "Read-only file system"}}

mzx-699 avatar Jul 29 '22 04:07 mzx-699