How to get file size
Posted: Wed Jan 08, 2020 5:49 pm
I am using uPython on a STM32F405 using a modified pyboard build. I have a 128Mb SPI external flash connected. i am able to format it for FAT and can read and write files with no problems.
But I cannot get the size of a file on the flash. I have been logging data successfully. It's a large file and I can read the first part of the file using uos.read(1000). The command, os.listdir('/fc') correctly lists all the files on the flash. But I can't figure out how to get the size of the files.
any suggestions?
But I cannot get the size of a file on the flash. I have been logging data successfully. It's a large file and I can read the first part of the file using uos.read(1000). The command, os.listdir('/fc') correctly lists all the files on the flash. But I can't figure out how to get the size of the files.
any suggestions?