Your company here — click to reach over 10,000 unique daily visitors

readclose - Man Page

read a whole file into a stralloc


#include <readclose.h>

int readclose(int fd,stralloc* sa,size_t bufsize);


readclose reads the whole content into the stralloc sa.  The file is read in chunks of bufsize bytes size.  If everything worked fine, readclose returns 0.  On error, readclose returns -1 and sets errno appropriately.

See Also

open_read(3), openreadclose(3), readclose_append(3)

Referenced By

openreadclose(3), readclose_append(3).