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