-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
dir: Add convenience functions for accessing UTF-8 variants (#362)
I'd like to make use of the fs_utf8 bits in some of my code, but doing so is tricky as switching `Dir` types quickly becomes "infectious" across the codebase and forces a larger conversion all at once. Adding these these two convenience APIs on `Dir` (the non-UTF8 version) I think greatly improve the ergonomics for the common cases where I may want to *view* an existing `Dir` entries (without creating a new file descriptor) and iterate over its entries, and to conveniently open a child dir as a utf-8 version. There are more methods we could add, but these feel like a useful start to me.
- Loading branch information
Showing
3 changed files
with
36 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters