Richard while (volIterator != vfsIteratorStop) { err = VFSVolumeEnumerate(&volRefNum, &volIterator); if (err != errNone) { break ; } else { err = VFSFileOpen(volRefNum, fileName, vfsModeRead, &filePtr); if (err == errNone) { MsgLog ("Open successful"); break; } } }
I am using the following code to read a file from the expansion card. On the device if the filename is "/palm/temp.jpg" it can open the image for reading. I want to get the same behaviour on my PC using simulator. I have tried "c:/palm/temp.jpg" as the filename (the file is present on my pc). But it returns an error that indicating that the file couldnot be found. I think the simulator is searching for the file some where else. Where should I place my file so that my program running on the simulator can access it. --Deepak ----- Original Message ----- From: "Richard Coutts" <[EMAIL PROTECTED]> To: "Palm Developer Forum" <[EMAIL PROTECTED]> Sent: Tuesday, December 16, 2003 7:45 PM Subject: Re: Regd VFS > Deepak, > > You specify the entire path when using VFSDirCreate -- from the "Palm OS > Companion" -- "All parts of the path except the last component must exist." > With POSE, the card is simulated on your desktops file system. E.g., you > may create a path called "/PALM/Programs/MyApp," where "/PALM" is the root > directory of the Card. But, you're actually creating the path > "C:/Card1/PALM/Programs/MyApp" on your PC. You can drag and drop files to > your path on your PC and then seem them show up on the "Card" in POSE. It's > very convenient. > > VFS programming itself I found to be a big pain, IMO. I don't envy you > starting in on this. There's an excellent article at > http://www.hhcenterprise.com/Developer/Expansion_1.htm that should get you > going. > > Rich > > ----- Original Message ----- > From: "Deepak TVS" <[EMAIL PROTECTED]> > To: "Palm Developer Forum" <[EMAIL PROTECTED]> > Sent: Tuesday, December 16, 2003 8:50 AM > Subject: Re: Regd VFS > > > > Where does the simulator create the file when I say VFSDirCreate. It > should > > have some default root directory. I am unable to find that directory. > > > > ----- Original Message ----- > > From: "Richard Coutts" <[EMAIL PROTECTED]> > > To: "Palm Developer Forum" <[EMAIL PROTECTED]> > > Sent: Tuesday, December 16, 2003 6:31 PM > > Subject: Re: Regd VFS > > > > > > > Use VFSFileOpen to open a directory for reading or writing. You can > > create > > > or delete a directory with VFSDirCreate and VFSFileDelete. > > > > > > ----- Original Message ----- > > > From: "Deepak TVS" <[EMAIL PROTECTED]> > > > To: "Palm Developer Forum" <[EMAIL PROTECTED]> > > > Sent: Tuesday, December 16, 2003 1:33 AM > > > Subject: Regd VFS > > > > > > > > > > Hi all, > > > > I have to read a file using VFS Manager. How do I specific a > > directory > > > > when I am debugging my code using a simulator so that I can read the > > file > > > > from that particular directory Or what is the default directory from > > which > > > > the simulotor reads files. > > > > > > > > Thanks & Regards, > > > > Deepak. > > > > > > > > > > > > -- > > > > For information on using the Palm Developer Forums, or to unsubscribe, > > > please see http://www.palmos.com/dev/support/forums/ > > > > > > > > > -- > > > For information on using the Palm Developer Forums, or to unsubscribe, > > please see http://www.palmos.com/dev/support/forums/ > > > > > > > > > -- > > For information on using the Palm Developer Forums, or to unsubscribe, > please see http://www.palmos.com/dev/support/forums/ > > > -- > For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/ > -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/