feat(files): allow decoding project files directly to string#2396
feat(files): allow decoding project files directly to string#2396
Conversation
|
Hi! Sorry if I am oversharing here, especially as I don't know this project and its conventions well (yet!). While this is definitely an improvement from the previous syntax I feel that this could and maybe should be even simpler. Because people mostly store source code in git then the most popular use-case here will probably be getting the content of the file as So I propose to add a method For bytes I would personally prefer having For completeness I would add PS I've never used |
|
@gdubicki thanks for the feedback! I'll take another look at what wording makes the most sense, especially when compared to For context, this In most other cases we do not add more higher-level convenience and instead keep it a thin wrapper, so I'd be wary of introducing more methods but if we do already provide some decoding then it probably makes sense to make it actually convenient for the user ;) I agree Edit: the |

Provides a slightly less clunky interface so people don't need to do
f.decode.().decode("utf-8")in user code.