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.file​exists(at​path:​is​directory:​) 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 , ispackagekey via resourcevalues(forkeys.

in case of bundles ispackage true.


Comments

Popular posts from this blog

php - Permission denied. Laravel linux server -

google bigquery - Delta between query execution time and Java query call to finish -

python - Pandas two dataframes multiplication? -