31class API_AUI_CORE AUrl {
33 using Resolver = std::function<_unique<IInputStream>(
const AUrl&)>;
37 inline AUrl(
const char* full) : AUrl(
AString(full)) {}
39 AUrl(
AString schema,
AString path) : mSchema(std::move(schema)), mPath(std::move(path)) {}
41 static AUrl file(
const AString& file) {
42 return {
"file", file};
46 _unique<IInputStream> open()
const;
49 const AString& path()
const noexcept {
54 const AString& schema()
const noexcept {
60 return mSchema +
"://" + mPath;
63 bool operator<(
const AUrl& u)
const {
64 return full() < u.full();
67 static void registerResolver(
const AString& protocol, Resolver resolver);