fsevents 0.3.4 → 0.3.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of fsevents might be problematic. Click here for more details.
- package/.travis.yml +24 -0
- package/Readme.md +4 -4
- package/fsevents.cc +16 -14
- package/fsevents.js +7 -7
- package/package.json +6 -8
- package/src/async.cc +5 -3
- package/src/constants.cc +22 -23
- package/src/methods.cc +12 -18
- package/src/storage.cc +16 -18
- package/src/thread.cc +6 -5
- package/test/function.js +10 -4
package/.travis.yml
ADDED
@@ -0,0 +1,24 @@
|
|
1
|
+
language: objective-c
|
2
|
+
|
3
|
+
env:
|
4
|
+
- NODE_VERSION="v0.10"
|
5
|
+
- NODE_VERSION="v0.12"
|
6
|
+
- NODE_VERSION="iojs-v1.0"
|
7
|
+
- NODE_VERSION="iojs-v2.0"
|
8
|
+
|
9
|
+
before_install:
|
10
|
+
- echo $TRAVIS_OS_NAME
|
11
|
+
- export PATH=./node_modules/.bin/:$PATH
|
12
|
+
- rm -rf ~/.nvm && git clone --depth 1 https://github.com/creationix/nvm.git ~/.nvm
|
13
|
+
- source ~/.nvm/nvm.sh
|
14
|
+
- nvm install $NODE_VERSION
|
15
|
+
- nvm use $NODE_VERSION
|
16
|
+
- node --version
|
17
|
+
- npm --version
|
18
|
+
- nvm --version
|
19
|
+
|
20
|
+
install:
|
21
|
+
- npm install
|
22
|
+
|
23
|
+
script:
|
24
|
+
- npm test
|
package/Readme.md
CHANGED
@@ -2,14 +2,14 @@
|
|
2
2
|
## Native Access to Mac OS-X FSEvents
|
3
3
|
|
4
4
|
* [Node.js](http://nodejs.org/)
|
5
|
-
* [Github repo](https://github.com/
|
6
|
-
* [Module Site](https://github.com/
|
5
|
+
* [Github repo](https://github.com/strongloop/fsevents.git)
|
6
|
+
* [Module Site](https://github.com/strongloop/fsevents)
|
7
7
|
* [NPM Page](https://npmjs.org/package/fsevents)
|
8
8
|
|
9
9
|
## Installation
|
10
10
|
|
11
11
|
$ npm install -g node-gyp
|
12
|
-
$ git clone https://github.com/
|
12
|
+
$ git clone https://github.com/strongloop/fsevents.git fsevents
|
13
13
|
$ cd fsevents
|
14
14
|
$ node-gyp configure build
|
15
15
|
|
@@ -40,7 +40,7 @@ watcher.stop() // To end observation
|
|
40
40
|
|
41
41
|
All events except *fsevent* take an *info* object as the second parameter of the callback. The structure of this object is:
|
42
42
|
|
43
|
-
```
|
43
|
+
```js
|
44
44
|
{
|
45
45
|
"event": "<event-type>",
|
46
46
|
"id": <eventi-id>,
|
package/fsevents.cc
CHANGED
@@ -10,12 +10,13 @@
|
|
10
10
|
#include "CoreFoundation/CoreFoundation.h"
|
11
11
|
#include "CoreServices/CoreServices.h"
|
12
12
|
#include <iostream>
|
13
|
+
#include <vector>
|
13
14
|
|
14
15
|
#include "src/storage.cc"
|
15
16
|
namespace fse {
|
16
17
|
class FSEvents : public node::ObjectWrap {
|
17
18
|
public:
|
18
|
-
FSEvents(const char *path,
|
19
|
+
FSEvents(const char *path, Nan::Callback *handler);
|
19
20
|
~FSEvents();
|
20
21
|
|
21
22
|
// locking.cc
|
@@ -40,12 +41,12 @@ namespace fse {
|
|
40
41
|
void threadStop();
|
41
42
|
|
42
43
|
// methods.cc - internal
|
43
|
-
|
44
|
+
Nan::Callback *handler;
|
44
45
|
void emitEvent(const char *path, UInt32 flags, UInt64 id);
|
45
46
|
|
46
47
|
// Common
|
47
48
|
CFArrayRef paths;
|
48
|
-
|
49
|
+
std::vector<fse_event*> events;
|
49
50
|
static void Initialize(v8::Handle<v8::Object> exports);
|
50
51
|
|
51
52
|
// methods.cc - exposed
|
@@ -58,10 +59,9 @@ namespace fse {
|
|
58
59
|
|
59
60
|
using namespace fse;
|
60
61
|
|
61
|
-
FSEvents::FSEvents(const char *path,
|
62
|
+
FSEvents::FSEvents(const char *path, Nan::Callback *handler): handler(handler) {
|
62
63
|
CFStringRef dirs[] = { CFStringCreateWithCString(NULL, path, kCFStringEncodingUTF8) };
|
63
64
|
paths = CFArrayCreate(NULL, (const void **)&dirs, 1, NULL);
|
64
|
-
events = CFArrayCreateMutable(NULL, 0, &FSEventArrayCallBacks);
|
65
65
|
threadloop = NULL;
|
66
66
|
lockingStart();
|
67
67
|
}
|
@@ -72,7 +72,6 @@ FSEvents::~FSEvents() {
|
|
72
72
|
handler = NULL;
|
73
73
|
|
74
74
|
CFRelease(paths);
|
75
|
-
CFRelease(events);
|
76
75
|
}
|
77
76
|
|
78
77
|
#ifndef kFSEventStreamEventFlagItemCreated
|
@@ -86,15 +85,18 @@ FSEvents::~FSEvents() {
|
|
86
85
|
#include "src/methods.cc"
|
87
86
|
|
88
87
|
void FSEvents::Initialize(v8::Handle<v8::Object> exports) {
|
89
|
-
v8::Local<v8::FunctionTemplate> tpl =
|
90
|
-
tpl->SetClassName(
|
88
|
+
v8::Local<v8::FunctionTemplate> tpl = Nan::New<v8::FunctionTemplate>(FSEvents::New);
|
89
|
+
tpl->SetClassName(Nan::New<v8::String>("FSEvents").ToLocalChecked());
|
91
90
|
tpl->InstanceTemplate()->SetInternalFieldCount(1);
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
91
|
+
tpl->PrototypeTemplate()->Set(
|
92
|
+
Nan::New<v8::String>("start").ToLocalChecked(),
|
93
|
+
Nan::New<v8::FunctionTemplate>(FSEvents::Start)->GetFunction());
|
94
|
+
tpl->PrototypeTemplate()->Set(
|
95
|
+
Nan::New<v8::String>("stop").ToLocalChecked(),
|
96
|
+
Nan::New<v8::FunctionTemplate>(FSEvents::Stop)->GetFunction());
|
97
|
+
exports->Set(Nan::New<v8::String>("Constants").ToLocalChecked(), Constants());
|
98
|
+
exports->Set(Nan::New<v8::String>("FSEvents").ToLocalChecked(),
|
99
|
+
tpl->GetFunction());
|
98
100
|
}
|
99
101
|
|
100
102
|
NODE_MODULE(fse, FSEvents::Initialize)
|
package/fsevents.js
CHANGED
@@ -29,13 +29,15 @@ module.exports.getInfo = getInfo;
|
|
29
29
|
module.exports.FSEvents = Native.FSEvents;
|
30
30
|
module.exports.Constants = Native.Constants;
|
31
31
|
|
32
|
+
var defer = global.setImmediate || process.nextTick;
|
33
|
+
|
32
34
|
function watch(path) {
|
33
35
|
var fse = new FSEvents(String(path || ''), handler);
|
34
36
|
EventEmitter.call(fse);
|
35
37
|
return fse;
|
36
38
|
|
37
39
|
function handler(path, flags, id) {
|
38
|
-
(
|
40
|
+
defer(function() {
|
39
41
|
fse.emit('fsevent', path, flags, id);
|
40
42
|
var info = getInfo(path, flags);
|
41
43
|
info.id = id;
|
@@ -54,16 +56,14 @@ function watch(path) {
|
|
54
56
|
}
|
55
57
|
|
56
58
|
function proxies(ctor, target) {
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
}
|
61
|
-
|
59
|
+
Object.keys(target.prototype).filter(function(key) {
|
60
|
+
return typeof target.prototype[key] === 'function';
|
61
|
+
}).forEach(function(key) {
|
62
62
|
ctor.prototype[key] = function() {
|
63
63
|
this._impl[key].apply(this._impl, arguments);
|
64
64
|
return this;
|
65
65
|
}
|
66
|
-
}
|
66
|
+
});
|
67
67
|
}
|
68
68
|
|
69
69
|
function getFileType(flags) {
|
package/package.json
CHANGED
@@ -1,10 +1,10 @@
|
|
1
1
|
{
|
2
2
|
"name": "fsevents",
|
3
|
-
"version": "0.3.
|
3
|
+
"version": "0.3.8",
|
4
4
|
"description": "Native Access to Mac OS-X FSEvents",
|
5
5
|
"main": "fsevents.js",
|
6
6
|
"dependencies": {
|
7
|
-
"nan": "
|
7
|
+
"nan": "^2.0.2"
|
8
8
|
},
|
9
9
|
"os": [
|
10
10
|
"darwin"
|
@@ -13,12 +13,11 @@
|
|
13
13
|
"node": ">=0.8.0"
|
14
14
|
},
|
15
15
|
"scripts": {
|
16
|
-
"
|
17
|
-
"test": "export PATH=$PATH:`pwd`/node_nodules/.bin/ && tap ./test"
|
16
|
+
"test": "tap ./test"
|
18
17
|
},
|
19
18
|
"repository": {
|
20
19
|
"type": "git",
|
21
|
-
"url": "https://github.com/
|
20
|
+
"url": "https://github.com/strongloop/fsevents.git"
|
22
21
|
},
|
23
22
|
"keywords": [
|
24
23
|
"fsevents",
|
@@ -26,11 +25,10 @@
|
|
26
25
|
],
|
27
26
|
"author": "Philipp Dunkel <pip@pipobscure.com>",
|
28
27
|
"license": "MIT",
|
29
|
-
"gypfile": true,
|
30
28
|
"bugs": {
|
31
|
-
"url": "https://github.com/
|
29
|
+
"url": "https://github.com/strongloop/fsevents/issues"
|
32
30
|
},
|
33
|
-
"homepage": "https://github.com/
|
31
|
+
"homepage": "https://github.com/strongloop/fsevents",
|
34
32
|
"devDependencies": {
|
35
33
|
"tap": "~0.4.8"
|
36
34
|
}
|
package/src/async.cc
CHANGED
@@ -12,14 +12,16 @@ void async_propagate(uv_async_t *async) {
|
|
12
12
|
char pathbuf[1024];
|
13
13
|
const char *pathptr = NULL;
|
14
14
|
fse->lock();
|
15
|
-
cnt =
|
15
|
+
cnt = fse->events.size();
|
16
16
|
for (idx=0; idx<cnt; idx++) {
|
17
|
-
event =
|
17
|
+
event = fse->events.at(idx);
|
18
|
+
if (event == NULL) continue;
|
18
19
|
pathptr = CFStringGetCStringPtr(event->path, kCFStringEncodingUTF8);
|
19
20
|
if (!pathptr) CFStringGetCString(event->path, pathbuf, 1024, kCFStringEncodingUTF8);
|
20
21
|
fse->emitEvent(pathptr ? pathptr : pathbuf, event->flags, event->id);
|
22
|
+
delete event;
|
21
23
|
}
|
22
|
-
if (cnt>0)
|
24
|
+
if (cnt>0) fse->events.clear();
|
23
25
|
fse->unlock();
|
24
26
|
}
|
25
27
|
|
package/src/constants.cc
CHANGED
@@ -85,27 +85,26 @@
|
|
85
85
|
#endif
|
86
86
|
|
87
87
|
static v8::Local<v8::Object> Constants() {
|
88
|
-
|
89
|
-
|
90
|
-
object->Set(
|
91
|
-
object->Set(
|
92
|
-
object->Set(
|
93
|
-
object->Set(
|
94
|
-
object->Set(
|
95
|
-
object->Set(
|
96
|
-
object->Set(
|
97
|
-
object->Set(
|
98
|
-
object->Set(
|
99
|
-
object->Set(
|
100
|
-
object->Set(
|
101
|
-
object->Set(
|
102
|
-
object->Set(
|
103
|
-
object->Set(
|
104
|
-
object->Set(
|
105
|
-
object->Set(
|
106
|
-
object->Set(
|
107
|
-
object->Set(
|
108
|
-
object->Set(
|
109
|
-
object
|
110
|
-
return NanEscapeScope(object);
|
88
|
+
v8::Local<v8::Object> object = Nan::New<v8::Object>();
|
89
|
+
object->Set(Nan::New<v8::String>("kFSEventStreamEventFlagNone").ToLocalChecked(), Nan::New<v8::Integer>(kFSEventStreamEventFlagNone));
|
90
|
+
object->Set(Nan::New<v8::String>("kFSEventStreamEventFlagMustScanSubDirs").ToLocalChecked(), Nan::New<v8::Integer>(kFSEventStreamEventFlagMustScanSubDirs));
|
91
|
+
object->Set(Nan::New<v8::String>("kFSEventStreamEventFlagUserDropped").ToLocalChecked(), Nan::New<v8::Integer>(kFSEventStreamEventFlagUserDropped));
|
92
|
+
object->Set(Nan::New<v8::String>("kFSEventStreamEventFlagKernelDropped").ToLocalChecked(), Nan::New<v8::Integer>(kFSEventStreamEventFlagKernelDropped));
|
93
|
+
object->Set(Nan::New<v8::String>("kFSEventStreamEventFlagEventIdsWrapped").ToLocalChecked(), Nan::New<v8::Integer>(kFSEventStreamEventFlagEventIdsWrapped));
|
94
|
+
object->Set(Nan::New<v8::String>("kFSEventStreamEventFlagHistoryDone").ToLocalChecked(), Nan::New<v8::Integer>(kFSEventStreamEventFlagHistoryDone));
|
95
|
+
object->Set(Nan::New<v8::String>("kFSEventStreamEventFlagRootChanged").ToLocalChecked(), Nan::New<v8::Integer>(kFSEventStreamEventFlagRootChanged));
|
96
|
+
object->Set(Nan::New<v8::String>("kFSEventStreamEventFlagMount").ToLocalChecked(), Nan::New<v8::Integer>(kFSEventStreamEventFlagMount));
|
97
|
+
object->Set(Nan::New<v8::String>("kFSEventStreamEventFlagUnmount").ToLocalChecked(), Nan::New<v8::Integer>(kFSEventStreamEventFlagUnmount));
|
98
|
+
object->Set(Nan::New<v8::String>("kFSEventStreamEventFlagItemCreated").ToLocalChecked(), Nan::New<v8::Integer>(kFSEventStreamEventFlagItemCreated));
|
99
|
+
object->Set(Nan::New<v8::String>("kFSEventStreamEventFlagItemRemoved").ToLocalChecked(), Nan::New<v8::Integer>(kFSEventStreamEventFlagItemRemoved));
|
100
|
+
object->Set(Nan::New<v8::String>("kFSEventStreamEventFlagItemInodeMetaMod").ToLocalChecked(), Nan::New<v8::Integer>(kFSEventStreamEventFlagItemInodeMetaMod));
|
101
|
+
object->Set(Nan::New<v8::String>("kFSEventStreamEventFlagItemRenamed").ToLocalChecked(), Nan::New<v8::Integer>(kFSEventStreamEventFlagItemRenamed));
|
102
|
+
object->Set(Nan::New<v8::String>("kFSEventStreamEventFlagItemModified").ToLocalChecked(), Nan::New<v8::Integer>(kFSEventStreamEventFlagItemModified));
|
103
|
+
object->Set(Nan::New<v8::String>("kFSEventStreamEventFlagItemFinderInfoMod").ToLocalChecked(), Nan::New<v8::Integer>(kFSEventStreamEventFlagItemFinderInfoMod));
|
104
|
+
object->Set(Nan::New<v8::String>("kFSEventStreamEventFlagItemChangeOwner").ToLocalChecked(), Nan::New<v8::Integer>(kFSEventStreamEventFlagItemChangeOwner));
|
105
|
+
object->Set(Nan::New<v8::String>("kFSEventStreamEventFlagItemXattrMod").ToLocalChecked(), Nan::New<v8::Integer>(kFSEventStreamEventFlagItemXattrMod));
|
106
|
+
object->Set(Nan::New<v8::String>("kFSEventStreamEventFlagItemIsFile").ToLocalChecked(), Nan::New<v8::Integer>(kFSEventStreamEventFlagItemIsFile));
|
107
|
+
object->Set(Nan::New<v8::String>("kFSEventStreamEventFlagItemIsDir").ToLocalChecked(), Nan::New<v8::Integer>(kFSEventStreamEventFlagItemIsDir));
|
108
|
+
object->Set(Nan::New<v8::String>("kFSEventStreamEventFlagItemIsSymlink").ToLocalChecked(), Nan::New<v8::Integer>(kFSEventStreamEventFlagItemIsSymlink));
|
109
|
+
return object;
|
111
110
|
}
|
package/src/methods.cc
CHANGED
@@ -5,44 +5,38 @@
|
|
5
5
|
|
6
6
|
void FSEvents::emitEvent(const char *path, UInt32 flags, UInt64 id) {
|
7
7
|
if (!handler) return;
|
8
|
-
|
8
|
+
Nan::HandleScope handle_scope;
|
9
9
|
v8::Local<v8::Value> argv[] = {
|
10
|
-
|
11
|
-
|
12
|
-
|
10
|
+
Nan::New<v8::String>(path).ToLocalChecked(),
|
11
|
+
Nan::New<v8::Number>(flags),
|
12
|
+
Nan::New<v8::Number>(id)
|
13
13
|
};
|
14
14
|
handler->Call(3, argv);
|
15
15
|
}
|
16
16
|
|
17
17
|
NAN_METHOD(FSEvents::New) {
|
18
|
-
|
19
|
-
|
20
|
-
NanUtf8String *path = new NanUtf8String(args[0]);
|
21
|
-
NanCallback *callback = new NanCallback(args[1].As<v8::Function>());
|
18
|
+
Nan::Utf8String *path = new Nan::Utf8String(info[0]);
|
19
|
+
Nan::Callback *callback = new Nan::Callback(info[1].As<v8::Function>());
|
22
20
|
|
23
21
|
FSEvents *fse = new FSEvents(**path, callback);
|
24
|
-
fse->Wrap(
|
22
|
+
fse->Wrap(info.This());
|
25
23
|
|
26
|
-
|
24
|
+
info.GetReturnValue().Set(info.This());
|
27
25
|
}
|
28
26
|
|
29
27
|
NAN_METHOD(FSEvents::Stop) {
|
30
|
-
|
31
|
-
|
32
|
-
FSEvents* fse = node::ObjectWrap::Unwrap<FSEvents>(args.This());
|
28
|
+
FSEvents* fse = node::ObjectWrap::Unwrap<FSEvents>(info.This());
|
33
29
|
|
34
30
|
fse->threadStop();
|
35
31
|
fse->asyncStop();
|
36
32
|
|
37
|
-
|
33
|
+
info.GetReturnValue().Set(info.This());
|
38
34
|
}
|
39
35
|
|
40
36
|
NAN_METHOD(FSEvents::Start) {
|
41
|
-
|
42
|
-
|
43
|
-
FSEvents* fse = node::ObjectWrap::Unwrap<FSEvents>(args.This());
|
37
|
+
FSEvents* fse = node::ObjectWrap::Unwrap<FSEvents>(info.This());
|
44
38
|
fse->asyncStart();
|
45
39
|
fse->threadStart();
|
46
40
|
|
47
|
-
|
41
|
+
info.GetReturnValue().Set(info.This());
|
48
42
|
}
|
package/src/storage.cc
CHANGED
@@ -7,23 +7,21 @@ struct fse_event {
|
|
7
7
|
UInt64 id;
|
8
8
|
UInt32 flags;
|
9
9
|
CFStringRef path;
|
10
|
-
|
11
|
-
|
10
|
+
|
11
|
+
fse_event(CFStringRef eventPath, UInt32 eventFlag, UInt64 eventId) {
|
12
|
+
this->path = eventPath;
|
13
|
+
this->flags = eventFlag;
|
14
|
+
this->id = eventId;
|
15
|
+
if (this->path != NULL)
|
16
|
+
CFRetain(this->path);
|
17
|
+
}
|
18
|
+
|
19
|
+
~fse_event() {
|
20
|
+
if (this->path != NULL)
|
21
|
+
CFRelease(this->path);
|
22
|
+
}
|
12
23
|
|
13
|
-
|
14
|
-
fse_event
|
15
|
-
|
16
|
-
copy->id = orig->id;
|
17
|
-
copy->flags = orig->flags;
|
18
|
-
copy->path = orig->path;
|
19
|
-
CFRetain(copy->path);
|
20
|
-
return copy;
|
21
|
-
}
|
22
|
-
void FSEventRelease(CFAllocatorRef allocator, const void * ptr) {
|
23
|
-
fse_event * evt = (fse_event * ) ptr;
|
24
|
-
CFRelease(evt->path);
|
25
|
-
CFAllocatorDeallocate(allocator, evt);
|
26
|
-
}
|
27
|
-
const CFArrayCallBacks FSEventArrayCallBacks = {
|
28
|
-
0, FSEventRetain, FSEventRelease, 0, 0
|
24
|
+
private:
|
25
|
+
fse_event(const fse_event&);
|
26
|
+
void operator=(const fse_event&);
|
29
27
|
};
|
package/src/thread.cc
CHANGED
@@ -37,12 +37,13 @@ void HandleStreamEvents(ConstFSEventStreamRef stream, void *ctx, size_t numEvent
|
|
37
37
|
FSEvents * fse = (FSEvents *)ctx;
|
38
38
|
size_t idx;
|
39
39
|
fse->lock();
|
40
|
-
fse_event event;
|
41
40
|
for (idx=0; idx < numEvents; idx++) {
|
42
|
-
event
|
43
|
-
|
44
|
-
|
45
|
-
|
41
|
+
fse_event *event = new fse_event(
|
42
|
+
(CFStringRef)CFArrayGetValueAtIndex((CFArrayRef)eventPaths, idx),
|
43
|
+
eventFlags[idx],
|
44
|
+
eventIds[idx]
|
45
|
+
);
|
46
|
+
fse->events.push_back(event);
|
46
47
|
}
|
47
48
|
fse->asyncTrigger();
|
48
49
|
fse->unlock();
|
package/test/function.js
CHANGED
@@ -43,6 +43,9 @@ test('functionality testing', function(t) {
|
|
43
43
|
t.ok(name === info.path, 'matched path');
|
44
44
|
switch (info.event) {
|
45
45
|
case 'created':
|
46
|
+
case 'modified':
|
47
|
+
// NOTE(bajtos) The recent versions apparently report `modified` event
|
48
|
+
// instead of `created`.
|
46
49
|
t.ok(path.basename(name) === 'created-fsevent', 'file created: ' + path.basename(name));
|
47
50
|
break;
|
48
51
|
case 'moved-out':
|
@@ -54,6 +57,9 @@ test('functionality testing', function(t) {
|
|
54
57
|
case 'deleted':
|
55
58
|
t.ok(path.basename(name) === 'moved-fsevent', 'file deleted: ' + path.basename(name));
|
56
59
|
break;
|
60
|
+
default:
|
61
|
+
t.ok(false, 'Uknown event type: ' + info.event);
|
62
|
+
break;
|
57
63
|
}
|
58
64
|
});
|
59
65
|
|
@@ -63,7 +69,7 @@ test('functionality testing', function(t) {
|
|
63
69
|
fs.writeFileSync(__dirname + '/temp/created-fsevent', 'created-fsevent');
|
64
70
|
|
65
71
|
console.error("===========================================================================");
|
66
|
-
},
|
72
|
+
}, 500);
|
67
73
|
setTimeout(function() {
|
68
74
|
console.error("===========================================================================");
|
69
75
|
console.error("\trenameSync(__dirname + '/temp/created-fsevent', __dirname + '/temp/moved-fsevent');");
|
@@ -71,17 +77,17 @@ test('functionality testing', function(t) {
|
|
71
77
|
|
72
78
|
console.error("===========================================================================");
|
73
79
|
|
74
|
-
},
|
80
|
+
}, 1000);
|
75
81
|
setTimeout(function() {
|
76
82
|
console.error("===========================================================================");
|
77
83
|
console.error("\tunlinkSync(__dirname + '/temp/moved-fsevent');");
|
78
84
|
fs.unlinkSync(__dirname + '/temp/moved-fsevent');
|
79
85
|
console.error("===========================================================================");
|
80
|
-
},
|
86
|
+
}, 1500);
|
81
87
|
setTimeout(function() {
|
82
88
|
console.error("===========================================================================");
|
83
89
|
console.error("\trmdirSync(__dirname + '/temp');");
|
84
90
|
fs.rmdirSync(__dirname + '/temp');
|
85
91
|
console.error("===========================================================================");
|
86
|
-
},
|
92
|
+
}, 2000);
|
87
93
|
});
|