2016-03-12 18:50:43 +00:00
|
|
|
#ifndef INCLUDED_File
|
|
|
|
#define INCLUDED_File
|
|
|
|
|
|
|
|
#include <v8.h>
|
|
|
|
|
2017-01-13 01:04:00 +00:00
|
|
|
typedef struct uv_fs_s uv_fs_t;
|
|
|
|
|
2016-03-12 18:50:43 +00:00
|
|
|
class File {
|
|
|
|
public:
|
|
|
|
static void configure(v8::Isolate* isolate, v8::Handle<v8::ObjectTemplate> global);
|
|
|
|
|
|
|
|
private:
|
|
|
|
static void readFile(const v8::FunctionCallbackInfo<v8::Value>& args);
|
|
|
|
static void writeFile(const v8::FunctionCallbackInfo<v8::Value>& args);
|
|
|
|
static void readDirectory(const v8::FunctionCallbackInfo<v8::Value>& args);
|
|
|
|
static void makeDirectory(const v8::FunctionCallbackInfo<v8::Value>& args);
|
|
|
|
static void unlinkFile(const v8::FunctionCallbackInfo<v8::Value>& args);
|
|
|
|
static void renameFile(const v8::FunctionCallbackInfo<v8::Value>& args);
|
2017-01-13 01:04:00 +00:00
|
|
|
static void stat(const v8::FunctionCallbackInfo<v8::Value>& args);
|
|
|
|
|
|
|
|
static void onStatComplete(uv_fs_t* request);
|
2016-03-12 18:50:43 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|