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

Function fs___FileSystemFromUri

r/src/filesystem.cpp:265–281  ·  view source on GitHub ↗

[[arrow::export]]

Source from the content-addressed store, hash-verified

263
264// [[arrow::export]]
265cpp11::writable::list fs___FileSystemFromUri(const std::string& path) {
266 using cpp11::literals::operator""_nm;
267
268#if defined(ARROW_R_WITH_S3)
269 // Initialize S3 before FileSystemFromUri so our options (with SIGPIPE handler)
270 // take effect before the C++ library's internal EnsureS3Initialized() call.
271 if (path.substr(0, 5) == "s3://") {
272 EnsureS3InitializedWithSigpipeHandler();
273 }
274#endif
275
276 std::string out_path;
277 auto io_context = MainRThread::GetInstance().CancellableIOContext();
278 return cpp11::writable::list({"fs"_nm = cpp11::to_r6(ValueOrStop(
279 fs::FileSystemFromUri(path, io_context, &out_path))),
280 "path"_nm = out_path});
281}
282
283// [[arrow::export]]
284void fs___CopyFiles(const std::shared_ptr<fs::FileSystem>& source_fs,

Callers 1

Calls 7

listFunction · 0.85
to_r6Function · 0.85
ValueOrStopFunction · 0.85
FileSystemFromUriFunction · 0.85
substrMethod · 0.80
CancellableIOContextMethod · 0.80

Tested by

no test coverage detected