Ecere SDK/eC Forums • View topic - Files manipulation in Ecere




Ecere SDK/eC Forums

Ecere Developers Community

Files manipulation in Ecere

Help with the Ecere cross platform system functionality: working with files, threads, timers, databases, etc.

Files manipulation in Ecere

Postby sacrebleu » Sun Mar 21, 2010 6:47 pm

Checking if a file exists, loading a text file's contents in a char *, saving a char *'s contents in a text file, loading and saving binary files
sacrebleu
 
Posts: 27
Joined: Sun Jan 17, 2010 12:37 pm

Re: Files manipulation in Ecere

Postby jerome » Fri Apr 02, 2010 10:32 am

Quick answers:

Checking if a file exists: FileExists

Loading a text file's contents in a char *: File f = FileOpen(...);, f.Read() (works just like fread in C)

You can also use other functions in the File class, such as GetLine(), etc.

Saving a char *'s contents in a text file: File f = FileOpen(...);, f.Write() (works just like fwrite in C)
You can also use other functions in the File class, such asPuts, Printf, Print, PrintLn, Putc, etc.

Loading and saving binary files: You should stick to File::Read() and File::Write() for binary.
jerome
Site Admin
 
Posts: 615
Joined: Sat Jan 16, 2010 11:16 pm


Return to System Library

Who is online

Users browsing this forum: No registered users and 1 guest

cron