Open FoamyGuy opened 4 months ago
I think you'd need to add a property for it here: https://github.com/adafruit/circuitpython/blob/5836f1145f61e411840e2d53e817b4aaa705f3ee/extmod/vfs_fat_file.c#L146
The property getter would read internal state for it.
I'm wondering how hard it would be to add support for the
name
property toFileIO
(or wherever is appropriate for use with the built-inopen()
)Currently In CPython:
Currently In CircuitPython:
I noticed this difference between CPython and CircuitPython while working on a
files
argument forrequests.post()
In CPython that argument supports a type of value that would rely on retrieving the name of an already opened file. I was unable to find a way to do that with circuitpython, but if some way does already exist that could be used for my purpose and it wouldn't be strictly necessary to add support forname
, but perhaps still nice to match cpython more closely.If there is interest in this functionality, and if adding support for this wouldn't be super challenging I'd be willing to give it a try. But I would probably need a point in the right direction within the core code for where to start looking to add it.