var loc = new Location.opaque_file(path)
var res = new MModule(model, mgroup, pn, loc)
- res.filepath = path
identified_modules_by_path[rp] = res
identified_modules_by_path[path] = res
mdoc.original_mentity = mgroup
end
- mgroup.filepath = dirpath
mgroups[rdp] = mgroup
return mgroup
end
var mgroup: nullable MGroup
# The path of the module source, if any
- var filepath: nullable String = null is writable
+ #
+ # safe alias to `location.file.filepath`
+ fun filepath: nullable String do
+ var res = self.location.file
+ if res == null then return null
+ return res.filename
+ end
# The package of the module if any
# Safe alias for `mgroup.mpackage`
fun is_root: Bool do return mpackage.root == self
# The filepath (usually a directory) of the group, if any
- var filepath: nullable String = null is writable
+ #
+ # safe alias to `location.file.filename`
+ fun filepath: nullable String do
+ var res
+ res = self.location.file
+ if res == null then return null
+ return res.filename
+ end
init
do