14#include "AUI/Common/AString.h"
15#include "AUI/Common/SharedPtr.h"
16#include "AUI/IO/IInputStream.h"
17#include <AUI/Common/AMap.h>
33 using Resolver = std::function<_unique<IInputStream>(
const AUrl&)>;
39 AUrl(
AString schema,
AString path) : mSchema(std::move(schema)), mPath(std::move(path)) {}
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);
77inline AUrl operator""_url(
const char* input,
size_t s) {
78 return AUrl(std::string{input, input + s});
A std::map with AUI extensions.
Definition: AMap.h:218
Represents a Unicode character string.
Definition: AString.h:37
Uniform Resource Locator implementation.
Definition: AUrl.h:31