Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Mac > Mac Programmer Help > Re: Can you do ...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 5 of 5 Topic 3724 of 3882
Post > Topic >>

Re: Can you do file I/O?

by SpreadTooThin <bjobrien62@[EMAIL PROTECTED] > Apr 29, 2008 at 01:46 PM

On Apr 29, 1:51=A0pm, Tom Harrington <t...@[EMAIL PROTECTED]
>
wrote:
> In article
> <46f65111-6b42-4031-b203-b80ccbbae...@[EMAIL PROTECTED]
>,
>
>
>
> =A0SpreadTooThin <bjobrie...@[EMAIL PROTECTED]
> wrote:
> > On Apr 28, 8:46=A0pm, Tom Harrington <t...@[EMAIL PROTECTED]
>
> > wrote:
> > > In article
> > > <0a83773e-121f-403a-916d-bfc18e676...@[EMAIL PROTECTED]
>,
>
> > > =A0SpreadTooThin <bjobrie...@[EMAIL PROTECTED]
> wrote:
> > > > on an iPhone application?
> > > > is there a filesystem?
> > > > I have an application that reads text files and its failing to
open =
a
> > > > file that is bundled with the application.
>
> > > > =A0 =A0fb.open (fname.c_str(), std::ios::in);
>
> > > > this call fails... (I know its C++, but that I don't think is the
> > > > issue)
>
> > > Well, are you sure that fname has a valid path? =A0That's the
obvious
> > > thing to check, and if you're not even sure if a filesystem is
> > > available, how do you know you've got a valid path on that
filesystem?=

>
> > I checked the path/filename and it exists under the simulator,
> > But remember I'm running in the simulator and I just don't know how
> > closely the simulator is to the actual device.
>
> Well, my NDA prevents me from getting too specific. =A0But I don't think
> I'm giving anything away by saying that it's probably a bad assumption
> to assume that the same path will be correct in both cases. =A0You could
> stand to look at whatever code generates fname and make sure it's not
> making assumptions that don't apply in both cases.
>
> --
> Tom "Tom" Harrington
> Independent Mac OS X developer since 2002http://www.atomicbird.com/

This is how the path to the file was derived....

std::string getDictionaryPath()
{
	return(std::string([[[NSBundle mainBundle] resourcePath]
UTF8String]));
}
Does that help you any?
 




 5 Posts in Topic:
Can you do file I/O?
SpreadTooThin <bjobrie  2008-04-28 14:36:09 
Re: Can you do file I/O?
Tom Harrington <tph@[E  2008-04-28 20:46:14 
Re: Can you do file I/O?
SpreadTooThin <bjobrie  2008-04-29 06:55:48 
Re: Can you do file I/O?
Tom Harrington <tph@[E  2008-04-29 13:51:10 
Re: Can you do file I/O?
SpreadTooThin <bjobrie  2008-04-29 13:46:13 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Fri Dec 5 10:29:23 CST 2008.