What does the /private prefix on an iOS file path indicate?

前端 未结 6 894
孤城傲影
孤城傲影 2020-12-14 15:34

I have a bug when my app runs on the iPhone but not when it runs on the simulator. I was using the length of the home directory path to extract the relative path of a file

6条回答
  •  独厮守ぢ
    2020-12-14 15:45

    In Swift 3, URL has the standardizedFileUrl property, which will remove any symlinks and resolve relative parts within the path like ./.

    As of writing the documentation is pretty useless but it looks like it is equivialent to NSURL's standardized property.

提交回复
热议问题