js_write(3)

NAME
js_write - Read data from an open file

SYNOPSIS
#include JsStr.h

int js_write(js_file *desc, js_string *js)

DESCRIPTION
js_write is a function that writes data from the string in js in to the open file desc.

ARGUMENTS
desc is a pointer to a file object opened for writing. js is a pointer to a js_string object that we will place in the file pointed to by desc.

RETURN VALUE
js_write returns JS_SUCCESS on sucessful writing of the data, JS_ERROR otherwise.

EXAMPLE
The following puts the string "filename" in the file "filename":
	js_string *foo;
	js_file *bar;
	foo = js_create(256,1);
	js_str2js(foo,"filename",8,1);
	js_open_write(foo,bar);
	js_write(bar,foo);

AUTHOR
Sam Trenholme <kiwi-zttfryb@koala.samiam.org>