@@ -33,10 +33,11 @@ namespace margelo::nitro::fastio {
33
33
std::string path SWIFT_PRIVATE;
34
34
std::string root SWIFT_PRIVATE;
35
35
double size SWIFT_PRIVATE;
36
+ std::string type SWIFT_PRIVATE;
36
37
double lastModified SWIFT_PRIVATE;
37
38
38
39
public:
39
- explicit Metadata (std::string name, std::string path, std::string root, double size, double lastModified): name(name), path(path), root(root), size(size), lastModified(lastModified) {}
40
+ explicit Metadata (std::string name, std::string path, std::string root, double size, std::string type, double lastModified): name(name), path(path), root(root), size(size), type(type ), lastModified(lastModified) {}
40
41
};
41
42
42
43
} // namespace margelo::nitro::fastio
@@ -55,6 +56,7 @@ namespace margelo::nitro {
55
56
JSIConverter<std::string>::fromJSI (runtime, obj.getProperty (runtime, " path" )),
56
57
JSIConverter<std::string>::fromJSI (runtime, obj.getProperty (runtime, " root" )),
57
58
JSIConverter<double >::fromJSI (runtime, obj.getProperty (runtime, " size" )),
59
+ JSIConverter<std::string>::fromJSI (runtime, obj.getProperty (runtime, " type" )),
58
60
JSIConverter<double >::fromJSI (runtime, obj.getProperty (runtime, " lastModified" ))
59
61
);
60
62
}
@@ -64,6 +66,7 @@ namespace margelo::nitro {
64
66
obj.setProperty (runtime, " path" , JSIConverter<std::string>::toJSI (runtime, arg.path ));
65
67
obj.setProperty (runtime, " root" , JSIConverter<std::string>::toJSI (runtime, arg.root ));
66
68
obj.setProperty (runtime, " size" , JSIConverter<double >::toJSI (runtime, arg.size ));
69
+ obj.setProperty (runtime, " type" , JSIConverter<std::string>::toJSI (runtime, arg.type ));
67
70
obj.setProperty (runtime, " lastModified" , JSIConverter<double >::toJSI (runtime, arg.lastModified ));
68
71
return obj;
69
72
}
@@ -76,6 +79,7 @@ namespace margelo::nitro {
76
79
if (!JSIConverter<std::string>::canConvert (runtime, obj.getProperty (runtime, " path" ))) return false ;
77
80
if (!JSIConverter<std::string>::canConvert (runtime, obj.getProperty (runtime, " root" ))) return false ;
78
81
if (!JSIConverter<double >::canConvert (runtime, obj.getProperty (runtime, " size" ))) return false ;
82
+ if (!JSIConverter<std::string>::canConvert (runtime, obj.getProperty (runtime, " type" ))) return false ;
79
83
if (!JSIConverter<double >::canConvert (runtime, obj.getProperty (runtime, " lastModified" ))) return false ;
80
84
return true ;
81
85
}
0 commit comments