how to open a file in symbian 3rd edition
| Thu, 2007-10-04 11:24 | |
|
hi friends, I wanna open a file in write mode. Initially there is no file on that path. p_log_file_ptr = icf_port_fopen("\\resource\\apps\\icf_logs.txt", "w+" ); fopen but it doesn't open the file . "\Symbian\9.2\S60_3rd_FP1\Epoc32\winscw\c\icf_logs.txt" Now the file is there but can't be written ............................ |
|






Forum posts: 286
All files under \Resource are readonly untill unless it has TCB capability. Why dont you move them to app's private directory?
Cheers,
Sri
Forum posts: 42
Hi friend,
First of all i put all the files in
p_log_file_ptr = icf_port_fopen("\\private\\280000A6\\icf_logs.txt", "w+" );
My application is consoled based and i want to see the log file.
I downloaded fileexplorer for that and make on copy of EXE in resource\apps folder.
I can run the EXE.
But Fileexplorer has not access to private directory . so i can't checks the logs.
Can u give me any pyher fruitful solution.
Forum posts: 286
What is icf_port_fopen? why are u not using RFile? If it ported from C then why are you not using fopen? If you not want to waste much time finding the solution of doing that way what you can do is after you are done with loggin copy the file in to some public folder. By this you can view from some external file viewer or copy in to system to view.
Cheers,
Sri
Forum posts: 1232
You should be able to create files in the root folder of c:\ without any special capabilities.
Looks like you are doing that on the emulator, why not do this also on target?
srikanth:
I think he is trying to port code written to be portable, that have wrapper functions for all "external" functions.
A common solution to keep all integration code in the same place.
His module obviously is named something with "icf" (judging from the log name) and "icf_port_" sounds like a good prefix for such wrapper functions
Forum posts: 68
I usually use C:\Data for log files, because that is point where the Symbian File Manager has access, of course that is only a plus for small programs with little log output. With large ones you like to have a PC screen to view them. And the PC has access to C:\