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 path • is empty
return path prefix
result : string writer • new()
if !skip prefix
result • write all(path prefix)
for var nonnegative i : 0; i < path • size; i += 1
if i > 0
result • write all(path[i])
return result • elements()
public resource catalog top()
return base resource catalog • new(this, default scheme(), empty[string] • new())