forked from micropython/micropython
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FileIO.name property #9195
Labels
Milestone
Comments
I think you'd need to add a property for it here: circuitpython/extmod/vfs_fat_file.c Line 146 in 5836f11
The property getter would read internal state for it. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
The text was updated successfully, but these errors were encountered: