chore(examples): improve contents listing with indent

This commit is contained in:
Erica Marigold 2024-12-30 18:22:47 +00:00
parent 895cd63fee
commit 023fb2bfd7
Signed by: DevComp
GPG key ID: 429EF1C337871656

View file

@ -16,10 +16,10 @@ end)
print("\nContents of `/`:")
local assets = reader:listDirectory("/")
for _, entry in assets do
print(entry.name, if entry.isDirectory then "DIR" else entry.size)
print(" ->", entry.name, if entry.isDirectory then "DIR" else entry.size)
if not entry.isDirectory then
local extracted = reader:extract(entry, { isString = true })
print("Content:", extracted)
print(" -> Content:", extracted)
end
end