It looks like
data.load()
expects a string likeresource://rabblerabble-at-jetpack/f/data/src/a.json
.
data.url("")
returns resource://rabblerabble-at-jetpack/f/data/
. So
b.uri.substring(data.url("").length)
returns src/a.json
, which is what data.load()
expects.
The self module has a uri
property. So maybe the forge.file.string()
is structured like that so that it can accept self
as a parameter. That's my best guess without being able to see all the code.