One Quickie


Converting from a path to an FSRef (General->Random)
  NSString *pathString = ... whatever ...;

  FSRef ref;
  status = FSPathMakeRef ((const UInt8 *)[pathString fileSystemRepresentation],
                          &ref, NULL);

  if (status != noErr) {
      NSLog (@"bummer.  couldn't make FSREf from path '%@'",
             pathString);
  }



borkware home | products | miniblog | rants | quickies | cocoaheads
Advanced Mac OS X Programming book

webmonster@borkware.com