tempfile icon indicating copy to clipboard operation
tempfile copied to clipboard

Support for Utf8Path TempFile and TempDir?

Open sunshowers opened this issue 2 years ago • 0 comments

Hi there --

I'm the primary maintainer of camino, a popular Rust library for UTF-8 paths. I'm wondering if you were interested in adding support for it to tempfile.

This could be behind an optional feature.

We could add:

  • Builder::utf8_tempfile/Builder::utf8_tempfile_in and NamedUtf8TempFile
  • Builder::utf8_tempdir/Builder::utf8_tempdir_in and Utf8TempDir

These methods could continue to return io::Error, and if conversion to UTF-8 isn't successful could return an InvalidData variant with more information in the payload, similar to canonicalize_utf8.

sunshowers avatar Jun 02 '22 00:06 sunshowers