Swift 3.0 FileManager.fileExists(atPath:) always return false

前端 未结 7 2153
一向
一向 2021-02-05 00:38

When I use method .fileExists(atPath:)to judge whether the file is exist in file system, the method always return false to me. I checked the file system and the fil

7条回答
  •  梦谈多话
    2021-02-05 01:10

    1. First, what does your file path looks like? If the path begins with a ~,then it must be expanded with expandingTildeInPath;
    2. Check if the path is inaccessible to your app. iOS App can only visits its sandbox directories.

提交回复
热议问题