-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathsyncSystem.js
More file actions
53 lines (36 loc) · 948 Bytes
/
syncSystem.js
File metadata and controls
53 lines (36 loc) · 948 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
"use strict";
// Collections of sync items
function Collection(collectionId) {
var self = this;
self.collectionId = collectionId;
self.items = [];
}
Collection.prototype.addItem = function(item){
};
Collection.prototype.findMatch = function(comparisonItem){
};
// Sync Items
function Item(data) {
var self = this;
var validKeys = ['name', 'location', 'kind', 'size', 'dateModified', 'dateCreated', 'md5', 'sha256'];
for(var i=0; i<validKeys.length; i++){
self[validKeys[i]] = null;
}
self.extras = {};
for (var key in data) {
if (data.hasOwnProperty(key)) {
if (validKeys.indexOf(key) !== -1) {
self[key] = data[key];
} else {
self.extras[key] = data[key];
}
}
}
}
// Sync item logs
function Log(data) {
var self = this;
}
exports.Item = Item;
exports.Collection = Collection;
exports.Log = Log;