Implements resource identifier resolution logic shared by implementations of resource_storess.
abstract class base resource store
extends debuggable
implements resource store
private string path prefix
private boolean do allow up
private boolean skip prefix
protected base resource store(string path prefix, boolean do allow up, boolean skip prefix)
this • path prefix = path prefix
this • do allow up = do allow up
this • skip prefix = skip prefix
protected abstract string default scheme()
override boolean allow up()
return do allow up
override string build name(string scheme, immutable list[string] path)
if pathis empty
return path prefix
result : string writer • new()
if !skip prefix
resultwrite all(path prefix)
for var nonnegative i : 0; i < pathsize; i += 1
if i > 0
resultwrite all(path[i])
return resultelements()
public resource catalog top()
return base resource catalog • new(this, default scheme(), empty[string] • new())