PDA

View Full Version : Change FSRef




arjit
Nov 23, 2009, 03:22 AM
how can i manipulate FSRef like add somthing to the end of it

example.

FSRef = /Home

i want to add Dump.txt

but Dump.txt is already there

how can i do it ?



gnasher729
Nov 23, 2009, 08:59 AM
how can i manipulate FSRef like add somthing to the end of it

example.

FSRef = /Home

i want to add Dump.txt

but Dump.txt is already there

how can i do it ?

Double-click on FSRef.
Right-click "Jump To Definition".
You should end up in "Files.h".

Have a look around to find the right function.

Instead of using Carbon you can obviously use any standard C or C++ methods, or Posix, or Cocoa. Whatever you prefer.

lee1210
Nov 23, 2009, 09:14 AM
I've never used carbon for anything, ever, but this seems like it might be the ticket:
http://developer.apple.com/mac/library/documentation/Carbon/Reference/File_Manager/Reference/reference.html#//apple_ref/c/func/FSMakeFSRefUnicode

5 minutes in the docs can work wonders.

-Lee