osx - Distinguish things like .app/.xcodeproj and actual folders in Cocoa -
i trying build alternative file manager works similar default finder in cocoa.
as can imagine, app needs show list of files/subfolders in directory, , when user click on item, checks whether it's folder or file user has clicked. if it's folder, app shows content of folder. if it's file, opened default application.
i used nsfilemanager.fileexists(atpath:isdirectory:) determine if item @ path folder. works in cases, things something.app or project.xcodeproj, considered directories according method. 
i know it's true technically folders, there way in cocoa distinguish them actual folders?
- use (ns)url.
- get values resource keys isdirectorykey,ispackagekeyviaresourcevalues(forkeys.
in case of bundles ispackage true.
Comments
Post a Comment