FileOpen is for filestream databases: Databases, which can be in the
main memory of the device, but act like standard file i/o files.
What you want it access to the external card, with a real file i/o,
because the external card has a real filesystem:
VFSOpen/Close etc.
1. Get the volume: there is an iterator and you iterate over all
volumesi nthe system, and look out for your path and/or your files in
the actual volume. If you find it, you go back with this volume
reference and use it for the whole app.
2. Access your files on this volRef: "/PALM/Programs/MyFolder/MyFile.prm"
Regards
Henk
cbruner wrote:
I wasn't actually using vfs. I was using FileOpen
Err err;
FileHand fh;
fh = FileOpen(0,"go.prm",0,0,fileModeReadOnly,&err);
if (fh!=0) DisplayMessage("Opened go.prm!!!");
else
{
fh = FileOpen(0,"\go.prm",0,0,fileModeReadOnly,&err);
if (fh!=0) DisplayMessage("Opened \\go.prm!!!");
else
{
fh = FileOpen(0,"/go.prm",0,0,fileModeReadOnly,&err);
if (fh!=0) DisplayMessage("Opened /go.prm!!!");
else
{
fh = FileOpen(0,"/PALM/go.prm",0,0,fileModeReadOnly,&err);
if (fh!=0) DisplayMessage("Opened /go.prm!!!");
}
}
}
if (fh==0) DisplayMessage("Could not be opened");
else
FileClose(fh);
the file "GO.PRM" is located in the root directory. (should it be
somewhere else?).
I'll play with VFS routines and see if that works better.
In the meantime, on Windows the program is set up as
C:\Complife\all the files.
What would be the best way to set it up on the palm?
Chris Bruner
Compulife Software Inc.
==============================================
----- Original Message ----- From: "Logan Shaw" <[EMAIL PROTECTED]>
To: "Palm Developer Forum" <[email protected]>
Sent: Sunday, September 25, 2005 2:16 AM
Subject: Re: File Save dialog for VFS?
Chris wrote:
This is very similar to a problem I'm having. I don't understand the
palm file system at all. I'm trying very hard to port an application
from the windows world to the Palm world, and it needs to keep it's
data files as data files with wierd extensions that only make sense
to my program. I had though that palm could access the sdcards as a
fat/vfat file system,
Yes, absolutely. That's the ONLY way the Palm can access the SD Card.
but from my experimentation I can't make that happen. I can't open a
file.
What arguments are you passing to VFSFileOpen(), and what is its error
code?
- Logan
--
For information on using the PalmSource Developer Forums, or to
unsubscribe, please see http://www.palmos.com/dev/support/forums/
--
-------------------------------------------------------------------------
Henk Jonas [EMAIL PROTECTED]
Palm OS ® certified developer
Please contact me, if you need an off-site contract worker.
-------------------------------------------------------------------------
--
For information on using the PalmSource Developer Forums, or to unsubscribe,
please see http://www.palmos.com/dev/support/forums/