>From the PalmOS API Reference:

"When the fileModeTemporary open mode is used and the file type passed to
FileOpen is 0, the FileOpen function uses sysFileTTemp (defined in
SystemMgr.rh) for the file type, as recommended. In future versions of Palm
OS, this configuration will enable the automatic cleanup of undeleted
temporary files after a system crash. Automatic post-crash cleanup is not
implemented in current versions of Palm OS."

You can have a temp file with FileOpen, but you have to set the openMode as
temporary, he is using ReadWrite.

Sebas.

-----Mensaje original-----
De: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] nombre de Aaron
Ardiri
Enviado el: martes, 03 de junio de 2003 5:29
Para: Palm Developer Forum
Asunto: Re: Where is my file? after I created a filestrem.


>> FileHand  fileStream;
>> fileStream = FileOpen( 0, "MyPalmFile", 0, 0, fileModeReadWrite, NULL );
>
> This creates a temporary file...
>
>> FileSeek (fileStream, 0, fileOriginBeginning );
>> FileWrite(fileStream, name, 1, 20, NULL);
>>
>> FileClose( fileStream );
>
> ... and this deletes it.

what are you smoking?

FileOpen/FileClose does not create temporary files. this is all
part of the File Streaming API. that is, a convenience system for
reading/writing to a .pdb file without having to worry about record
structures (it stores it as that tho).

i have been using this functionality for years, and, it is NOT
temporary file stuff. in light of the problem, the original
poster emailed me privately - and, the email should probably be
here in public for forum archive purposes.

===
Q: how to get access to the data written using FileOpen

POSE:   use the export database option in the emulator
DEVICE: set backup bit, sync - database will be in backup directory

Q: how to read/write the data stored in the .pdb file?

use a desktop utility called 'par'

http://www.djw.org/product/palm/par/

it will allow you to manipulate file streams directly.
===

hopefully that will end all discussions on this topic. RTFM guys.

dont email me privately - the forums exist for a reason, and, i
get enough 'how to i program' type emails a day - i dont need to
be flooded with more :) thanks for understanding.

---
Aaron Ardiri                           [EMAIL PROTECTED]
CEO - CTO                                              +46 70 656 1143
Mobile Wizardry                         http://www.mobilewizardry.com/


--
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/

Reply via email to