Files manipulation in Ecere
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
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.
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.