-
Sat 2021.03.20
'even if I simply overwrite same piece of code one or more times'
Would you please post your code snippet that demonstrates the write and then read process.
By chance are the modes mixed?4th bullet below heading 'A few things are going on here:'
'A file created with require("Storage").open is different to one created with require("Storage").write since it is designed to be appended to. As such you can only access the files with require("Storage").open and not with require("Storage").write/read/erase/etc'
'even if I simply overwrite same piece of code one or more times'
It would help by posting the results alternating between each of these instructions demonstrating the 'overwrite' as is observed.
-
Hi @Robin,
first of all thanks for your reply.
I think there is a misunderstanding, maybe I've messed up my explanation.
I've experienced the following using IDE:
- get code of MorphingClock from my Bangle storage using specific icon (4 disks);
- modified code and tried it with success using RAM upload function;
- overwrite existing mclock.app.js code into Bangle storage using specific icon (chip icon with drop down menu);
After each cycle of changes made as exposed in the pointed list above, looking at 'About' app I've seen my free disk space reduced.
For each cycle, space consumption increased of the amount of bytes occupied by code uploaded; like it was written n times in place of one time in the same position.
Yesterday I've discovered 'require('Storage').compact()' function and I've tried it with success.
Now space consumption value is as expected.No new files were created during changes or coding, neither inside the code nor through upload function. I've made changes and then saved them on the same file (mclock.app.js) n times, nothing more.
After this I think this behaviour is normal, but my question is what about to happen if space consumption reading would reach the maximum.
Thanks for patience.
Massimiliano
- get code of MorphingClock from my Bangle storage using specific icon (4 disks);
Hi all,
I've seen that each time I write code onto Storage using IDE free space read by "About" app is reduced.
This happens even if I simply overwrite same piece of code one or more times.
Is it real?
What I can do to avoid it?
Sorry but I'm confused.