MCPcopy Create free account
hub / github.com/apache/arrow / fs___FileInfo__mtime

Function fs___FileInfo__mtime

r/src/filesystem.cpp:96–103  ·  view source on GitHub ↗

[[arrow::export]]

Source from the content-addressed store, hash-verified

94
95// [[arrow::export]]
96SEXP fs___FileInfo__mtime(const std::shared_ptr<fs::FileInfo>& x) {
97 SEXP res = PROTECT(Rf_allocVector(REALSXP, 1));
98 // .mtime() gets us nanoseconds since epoch, POSIXct is seconds since epoch as a double
99 REAL(res)[0] = static_cast<double>(x->mtime().time_since_epoch().count()) / 1000000000;
100 Rf_classgets(res, arrow::r::data::classes_POSIXct);
101 UNPROTECT(1);
102 return res;
103}
104
105// [[arrow::export]]
106void fs___FileInfo__set_mtime(const std::shared_ptr<fs::FileInfo>& x, SEXP time) {

Callers 1

Calls 1

countMethod · 0.45

Tested by

no test coverage detected