Implement resource identifier associated with a resource_store and a path.
class base resource identifier
extends debuggable
implements resource identifier
private resource store the resource store
private string the scheme
base resource identifier(resource store the resource store, string the scheme, immutable list[string] path)
override base resource identifier parent()
if parent path size is nonnegative
else
return base resource identifier • new(the resource store, the scheme, path • slice(0, parent path size))
return this
override resource[string] access string(access option or null options)
return string resource • new(this, options)
private class string resource
string resource(base resource identifier the identifier, access option or null options)
this • the identifier = the identifier
this • options = options
override string get()
return the identifier • the resource store • read string(the identifier • the scheme, the identifier • path)
override void set(string new value)
if options is make catalog option && the identifier • path • size > 1
the identifier • the resource store • write string(the identifier • the scheme, the identifier • path, new value)