bladox.com Forum Index bladox.com
Turbo SIM Toolkit Adapter Forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Prepisovani, dopisovani do souboru

 
Post new topic   Reply to topic    bladox.com Forum Index -> v?e o turbu
View previous topic :: View next topic  
Author Message
chip
Guest





PostPosted: Thu Apr 01, 2004 5:53 pm    Post subject: Prepisovani, dopisovani do souboru Reply with quote

Mel bych dotaz,
1. jak provest prepsani existujiciho souboru
2. a jak pripisovat text k jiz vytvorenemu souboru

zkousel jsem

...
mc_set_type (b, t_ext_txt);
fd = mc_open (b, FILE_APPEND);
mc_append (fd,"ahoj", 4);
mc_close (fd);
...
bohuzel umi vytvorit pouze novy soubor treba i se stejnym jmenem a nevim jak jak se tohoto zbavit.

Predem dik za odpovedi
Back to top
pz
Guest





PostPosted: Fri Apr 02, 2004 6:15 am    Post subject: Reply with quote

Zkuzte nejdriv nalezt existujici soubor pomoci mc_find.
Pr.

u8 PROGMEM t_nazev_meho_souboru[]="muj soubor";

b32 b=mc_find(0, t_nazev_meho_souboru, FS_FIND_STRING);

if(b<0)
{
//neexistuje
}
else
{
//existuje
MCFILE *fd=mc_open(b, FILE_APPEND); // pripsani na konec nebo MC_REWRITE pro prepsani lib. existujici pozice
...
}

pro vymazani obsahu souboru pouzijte mc_clear(b)

P.
Back to top
Display posts from previous:   
Post new topic   Reply to topic    bladox.com Forum Index -> v?e o turbu All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group