Then later I convert the path name to a FSSpec, then an
FSRef:
///////////////////////////////////////////////// // Delete ~/lib and all its
contents ///////////////////////////////////////////////// // Make dir spec
from pathname...
It's the call to
FSPathMakeFSSpec that is failing with file not found. That same
call works on lots of other pathnames that I have converted like any
file name inside /tmp such as:
UInt8*pathPOSIX =
"tmp/filename";
It's specifying the current user's home dir in the path name that
seems to be causing
FSPathMakeFSSpec to fail.
Thanks,
Michael
Orbital Launch & Lift, Inc.
http://www.orbitallaunch.com
At 1:28 AM -0500 11/16/04, Ian Krieg wrote:
Could you show us the actual function
call that you use this path with? I haven't actually done much
POSIX via Carbon, but perhaps those who have will be better able to
help you when they see this extra information. If you type
"cd ~" into Terminal, it will take you to the Home
directory, so I think the issue must be elsewhere now. For
instance, the expansion of paths is done by the shell, not by the
individual POSIX programs that use them. Therefore, if the
method you are using forks a UNIX process directly without going
through a shell, you may need to use a different launch method or find
a way to generate the path before you make the call.
Ian Krieg
My code basically looks like this,
"lib" being the dir inside the current user's dir that I
want to delete:
UInt8*userslibPathPOSIX
= "./lib";
I've tried:
UInt8*userslibPathPOSIX
= "./lib";
and
UInt8*userslibPathPOSIX
= "~/lib";
and
UInt8*userslibPathPOSIX
= "Users/~/lib";
and
UInt8*userslibPathPOSIX
= "$HOME/lib";
None of them work.
Michael
Orbital Launch & Lift,
Inc.
http://www.orbitallaunch.com
At 1:16 AM -0500 11/16/04, Ian Krieg
wrote:
I believe it is "~".
"." is the current working directory, which might be the
home directory. It might be guaranteed by Apple, I don't know,
but I know that tilde will always be the home directory, even if other
POSIX commands have selected a different working directory.
Ian Krieg
Isn't the current user directory just
specified as "."?
Ian
This may be a newbie question, but how do
I specify the current user directory using a POSIX-style pathname in
Carbon? I need to delete a directory directly inside the current user
directory so I need to make a fixed path as a POSIX pathname string
and then convert it to an FSRef.
Thanks,
Michael
Orbital Launch & List, Inc.
http://www.orbitallaunch.com
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Carbon-dev mailing list
(email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/carbon-dev/email@hidden
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Carbon-dev mailing list
(email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/carbon-dev/lists%40orbitallaunch.com
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Carbon-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/carbon-dev/email@hidden
This email sent to email@hidden