Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: FSRef and unicode



What about FSRefMakePath.

However I would encourage not to use paths on MAC unless necessary. FSRefs are a much more clever way of file indexing and you can get a lot of information from the FSGetCatalogInfo.

Another question : FSPathMakeRef will return -43 if
file does not exist, correct? so FSPathMakeRef should
not be used with non existing files, right?
right

Charles

Angelo Chen <email@hidden> wrote:
Hi Charles and Mike,

Thanks for the help, now I use

err = FSGetCatalogInfo (&ref, kFSCatInfoNone, NULL,
&p, NULL, NULL);

if the file name is "/test/test2.mov$", what returned
in p is only "test2.mov$", I'd like to get the
complete file name including directory, how?

Another question : FSPathMakeRef will return -43 if
file does not exist, correct? so FSPathMakeRef should
not be used with non existing files, right?

Thanks,

--- Charles Gregory »¡¡G

> Hi Angelo,
>
> What about:
> FSGetCatalogInfoBulk to obtain the filename,
> followed by a LSGetExtensionInfo to get the index
> in the FileName Unicode Array of where the extension
> starts.
> Then a string comaparison between "mpeg" and your
> extension.
>
> to create the the file,
> FSCreaetfileUnicode.
>
> hope that helps,
> Not sure this is the best way, but it works for me.
>
> Charles
>
> Angelo Chen wrote: Hi,
>
> A totaly newbie to this FSRef but needs a quick
> solution:)
>
> I have a FSRef, and I'd like to check if file name
> in
> it has a extension mpeg$, if yes I'd like to create
> another FSRef that has exactly the same name except
> no
> $ sign, any way to do this?
>
> Thanks,
>
>
> ²{¦b§A¥i»´©öªý¾×©U§£¶l¥ó¡A¥ß§Y¨Ï¥ÎYahoo!
> Mail§A´N·|¬Û«H!
>
>
> _______________________________________________
> 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
>
>
>
> ---------------------------------
> Yahoo! Answers - Get better answers from someone
> who knows. Tryit now.>
_______________________________________________
> 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



²{¦b§A¥i»´©öªý¾×©U§£¶l¥ó¡A¥ß§Y¨Ï¥ÎYahoo! Mail§A´N·|¬Û«H!




Yahoo! Mail is the world's favourite email. Don't settle for less, sign up for your free account today.
 _______________________________________________
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

References: 
 >(no subject) (From: Angelo Chen <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.