29 if (
url.starts_with(
"file://")) {
30 return std::make_unique<LocalByteSource>(
url.substr(7), options);
32 for (
auto scheme : {
"root://",
"roots://",
"xroot://",
"xroots://"}) {
33 if (
url.starts_with(scheme)) {
34#ifdef AODNATIVE_WITH_XROOTD
35 return std::make_unique<XRootDByteSource>(std::move(
url), options);
37 throw IoError(
url,
"the native reader was built without XRootD");
41 for (
auto scheme : {
"http://",
"https://"}) {
42 if (
url.starts_with(scheme)) {
43#ifdef AODNATIVE_WITH_CURL
44 return std::make_unique<HttpByteSource>(std::move(
url), options);
46 throw IoError(
url,
"the native reader was built without curl");
51 for (
auto scheme : {
"alien://"}) {
52 if (
url.starts_with(scheme)) {
53 throw IoError(
url,
"alien:// names must be resolved to a replica first");
56 if (
url.find(
"://") != std::string::npos) {
59 return std::make_unique<LocalByteSource>(std::move(
url), options);