Sha256: fd373324fe7d51467451db696f0d0c7b4062187cdd97ac8e0b24d56e4fb5af00
Contents?: true
Size: 1007 Bytes
Versions: 79
Compression:
Stored size: 1007 Bytes
Contents
/* ** © 2014 by Philipp Dunkel <pip@pipobscure.com> ** Licensed under MIT License. */ void FSEvents::emitEvent(const char *path, UInt32 flags, UInt64 id) { if (!handler) return; NanScope(); v8::Local<v8::Value> argv[] = { NanNew<v8::String>(path), NanNew<v8::Number>(flags), NanNew<v8::Number>(id) }; handler->Call(3, argv); } NAN_METHOD(FSEvents::New) { NanScope(); NanUtf8String *path = new NanUtf8String(args[0]); NanCallback *callback = new NanCallback(args[1].As<v8::Function>()); FSEvents *fse = new FSEvents(**path, callback); fse->Wrap(args.This()); NanReturnValue(args.This()); } NAN_METHOD(FSEvents::Stop) { NanScope(); FSEvents* fse = node::ObjectWrap::Unwrap<FSEvents>(args.This()); fse->threadStop(); fse->asyncStop(); NanReturnValue(args.This()); } NAN_METHOD(FSEvents::Start) { NanScope(); FSEvents* fse = node::ObjectWrap::Unwrap<FSEvents>(args.This()); fse->asyncStart(); fse->threadStart(); NanReturnValue(args.This()); }
Version data entries
79 entries across 79 versions & 3 rubygems