公告

👇 微信 👇

图片

欢迎私信交流

Skip to content

path not found exception cannot retrieve length of file,path = xxx ​

问题描述 ​

  • 程序开发阶段
  • 运行程序,写入图片至外存
  • 停止程序,重新运行程序,尝试从外存中读取文件,遇到下述错误
path not found exception cannot retrieve length of file, path = xxx

原因分析 ​

  • 图片并非没有存储成功,而是苹果应用的独特机制
    • 在开发过程中,重新运行程序,应用的私有存储位置会自动发生变化
      • 例如,首次运行,位置为 a ,再次运行,位置为 b

参考资料 ​