I’ve noticed that FSPathMakeRef() and FSRefMakePath() are now deprecated in OS X 10.8.
I have some code that uses them to find the canonical case for a path, e.g. if passed “/USeRs” it will return “/Users”.
Why have these and other related functions been deprecated, and what non-deprecated API should be used now instead to provide equivalent functionality?
Use
NSURLto store both ordinary paths and file reference paths.From the File Manager documentation (Appendix A: Deprecated File Manager Functions):
From what I can tell, Apple chose to deprecate the
FSReftype entirely, favouring file reference URLs (which look likefile:///.file/id=6571367.39068/) instead.If you want to canonicalize a string path, you can do the following using non-deprecated APIs: