loop
for f in list_files(dir) do
var path = dir/f
- if path.file_stat.is_dir then
+ if path.file_stat.as(not null).is_dir then
directories.push(path)
else if f.has_suffix(".xml") and f != "index.xml" then
reader.read(path)
# Download element
if sys.verbose then print "+ Acting on {element}"
- tool_config.act_on element
+ tool_config.as(not null).act_on element
# Add `unique_id` to log
history.add unique_id
continue
end
- for dir in source_folder.files do if dir.stat.is_dir then
+ for dir in source_folder.files do if dir.stat.as(not null).is_dir then
folder_names.add dir.filename
end
end
var elements = new Array[Element]
for item in items do
- var title = item[tool_config.tag_title].first.as(XMLStartTag).data
- var link = item[tool_config.tag_link].first.as(XMLStartTag).data
+ var title = item[tool_config.as(not null).tag_title].first.as(XMLStartTag).data
+ var link = item[tool_config.as(not null).tag_link].first.as(XMLStartTag).data
elements.add new Element(title, link)
end