While trying the approach suggested here, working directory gets prefixed instead of path conversion. Leading :
is HFS
path does not make any difference.
NSString * ttt = @"Macintosh HD:Users:gautam:code:Help:";
if (CFURLRef url = CFURLCreateWithFileSystemPath(kCFAllocatorDefault, (CFStringRef)ttt, kCFURLPOSIXPathStyle, false))
{
NSString * posixPath = [(__bridge NSURL*)url path];
// posixPath __NSCFString * "/Users/gautamjha/code/Macintosh HD:Users:gautam:code:Help:"
const char * secondName = [posixPath UTF8String];
// above does not help either working directory gets prefixed.
}