• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

POSIX and HFS paths

 
Ranch Hand
Posts: 1970
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Not really a Java question, but a Mac one. In fact, I will be implementing in C/C++ (ugh!).

Anyone know of a way to tell reliably whether a given path (as a string) is POSIX or HFS?

There are various "obvious" things to do, such as looking for colons and/or slashes. But those sorts of heuristics often have pitfalls. I am hoping there might be a properly thought-out approach.

I have looked in CFURL package of Mac frameworks, which has stuff for converting between POSIX and HFS, but not for determining which one you've got.

The higher-level requirement is that I want to take a file path that I have been given through an interface that doesn't say what type it is. It could be POSIX or HFS. I want to end up with a path that is definitely HFS.
 
I think I'll just lie down here for a second. And ponder this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic