[[arrow::export]]
| 94 | |
| 95 | // [[arrow::export]] |
| 96 | SEXP 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]] |
| 106 | void fs___FileInfo__set_mtime(const std::shared_ptr<fs::FileInfo>& x, SEXP time) { |
no test coverage detected