[Top] [Prev] [Next] [Bottom]
[Contents]
SaReadFileToString
Reads a file and returns its contents as a malloc'd string.
#include "SaRnHtml.h"
char* SaReadFileToString(char* filename);
Arguments
- filename
- A string specifying the filepath name of the file to read. The current directory will be the HTML file directory for the project.
Return Values
Returns NULL on read failure. Otherwise, returns the file's contents as a malloc'd string.
Reads a file and returns its contents as a malloc'd string. The argument, filename, is a string specifying the filepath name of the file to read. The current directory will be the HTML file directory for the project. Returns NULL on read failure. Otherwise, returns the file's contents as a malloc'd string.
char* contents;
contents = SaReadFileToString("company_log.html");
fprintf(stdout, "%s", contents);
free(contents);
See Also
[Top] [Prev] [Next] [Bottom]
[Contents]
info@bluestone.com
Copyright © 1997, Bluestone. All rights
reserved.