Tasmota/lib/libesp32/Berry/examples/listdir.be

17 lines
331 B
Plaintext
Raw Normal View History

2021-04-12 18:53:35 +01:00
import os
def scandir(path)
print('path: ' + path)
for name : os.listdir(path)
var fullname = os.path.join(path, name)
if os.path.isfile(fullname)
print('file: ' + fullname)
else
print('path: ' + fullname)
scandir(fullname)
end
end
end
scandir('.')