Code: Select all
>>> import os
>>> for i in range(1000):
>>> dirname = str(i)
>>> os.mkdir(dirname)
>>> print(i)
Code: Select all
Traceback (most recent call last):
File "<stdin>", line 3, in <module>
OSError: [Errno 13] EACCES
How can I create more files/directories?
I try to implement a log-system, with ~2KB logfiles... it should be theoretically feasible to create ~1000 logfiles on the flash, but with this problem there are only (longer names of the logfiles) ~180 logfiles possible.
(I use MicroPython esp8266-20171101-v1.9.3.bin on ESP8266)
(with esp32-20180419-v1.9.3-548-gd12483d9 on ESP32 there is the same problem)
edit:
think about a SD-Card:
On an ESP8266, the free RAM size is ~20-25KB? With 25KB-Files (because you cannot open or read larger files with 25KB RAM size?), and the abovementioned limit of ~510 files => only 12,7MB of data will be possible in MicroPython on an ESP8266?
edit2:
with free RAM size of ~20-25KB, there should be more files/directories possible... these should not be the limitator/the reason for this problem... there should be ten times more files/directories possible (I guess ~5000 files with really short names will be the limit in one directory, because if there are much more files/directories you will get a memory exception if you try os.listdir() or something else?)