Re: Where is my file? after I created a filestrem.

2003-06-05 Thread Aaron Ardiri
> "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.

i always thought that temp files are deleted on system reset - and,
even that depends on the OS version in regards to how it functions
exactly.

if running on POSE, you should be able to export the database - but,
in the long run, yes - he will want to not pass zero for some of
those  parameters. i did miss that he was passing zero for the file
type. good catch, but, ideally - with that flag not being
zero - my comments apply :)

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


RE: Where is my file? after I created a filestrem.

2003-06-05 Thread Sebastian Cancinos
>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/


Re: Where is my file? after I created a filestrem.

2003-06-03 Thread Aaron Ardiri
>> 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/


Re: Where is my file? after I created a filestrem.

2003-06-03 Thread Philip Sheard
> I am using Palm OS 5,  I try to create a file stream, the code as
following

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

> I am using CodeWarrior and Palm Emulator. It should create a file stream,
but I can't find it in my hard driver. Could any expert tell me where it
is??



-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/support/forums/


Re: Where is my file? after I created a filestrem.

2003-06-03 Thread Aaron Ardiri
> I am using Palm OS 5,  I try to create a file stream, the code as
following
>
> ...
> FileHand  fileStream;
> fileStream = FileOpen( 0, "MyPalmFile", 0, 0, fileModeReadWrite, NULL );
>
> FileSeek (fileStream, 0, fileOriginBeginning );
> FileWrite(fileStream, name, 1, 20, NULL);
>
> FileClose( fileStream );
> ..
>
> I am using CodeWarrior and Palm Emulator. It should create a file
> stream, but I can't find it in my hard driver. Could any expert
> tell me where it is??

if you set the backup bit, and, sync - it'll be called "MyPalmFile.pdb"
if you want to create a file on external memory, you may want to look
at the VFS api's.

filestreaming goes way back to palmos 3.0 - and, was designed as an easy
way to access data in the old palm database format (back when VFS didn't
exist) unfortunately, the format was never documented that well - but,
many have reverse engineered it (including myself) successfully - par and
other  utilities can be used to generate or process these resources.

identify what it is you really want to do :)

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