Ecere SDK/eC Forums https://ecere.org/community/ Print view |
|
Files manipulation in Ecere https://ecere.org/community/viewtopic.php?f=9&t=57 |
Page 1 of 1 |
Author: | sacrebleu [ Sun Mar 21, 2010 6:47 pm ] |
Post subject: | Files manipulation in Ecere |
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 |
Author: | jerome [ Fri Apr 02, 2010 10:32 am ] |
Post subject: | Re: Files manipulation in Ecere |
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. |
All times are UTC-05:00 | Page 1 of 1 |
Powered by phpBB® Forum Software © phpBB Limited |