#ifndef JS_DIRECTORYSTREAM_H #define JS_DIRECTORYSTERAM_H #include #include "stream.h" /* DirectoryStream object Allows enumeration of directory contents. class DirectoryStream extends Stream { public: //Read a filename string read() //Read len number of filenames string read(int len) //Unsupported, throw exception. string readChar() //Unsupported, throw exception. void seek(int pos, int base_point) //Gets number of filenames available for reading. int getBytesAvailable() //Unsupported, throw exception. int write(string data) //Unsupported, throw exception. int write(string data, int len) } */ JSBool register_class_DirectoryStream(JSContext *cx); JSObject *DirectoryStream_getPrototypeObject(); struct _DirectoryStreamInformation { StreamInformation streamInfo; DIR *handle; char *path; }; typedef struct _DirectoryStreamInformation DirectoryStreamInformation; #endif