printn "Reading {dir}... "
end
loop
- for f in dir.files do
+ for f in list_files(dir) do
var path = dir/f
if path.file_stat.is_dir then
directories.push(path)
if directories.length <= 0 then break
dir = directories.pop
end
+ model.add_global_modules
print "Done."
if file_count < 2 then
print "{file_count} file read."
end
end
+ # List files in a directory.
+ #
+ # This method may be redefined to force the order in which the files
+ # are read by `load_project`.
+ protected fun list_files(dir: String): Collection[String] do
+ return dir.files
+ end
+
# Check the project’s name.
private fun check_name(name: String) do
assert name_valid: not name.chars.first.is_upper else