haskell / file-io

File IO (read/write/open) for OsPath API
11 stars 4 forks source link

support `openBinaryTempFile` #2

Closed hasufell closed 2 months ago

hasufell commented 2 years ago

https://gitlab.haskell.org/ghc/ghc/-/blob/67072c31d8b6ce4f0de79fa52bc3e5cdd5a495c6/libraries/base/System/IO.hs#L501-591

maerwald: you can inline a simplified version, the one from handleResultsWinIO, findTempNamePosix is legacy but I hadn't removed it yet as we'll remove it all when winio becomes the only one. but difference is only in what they do with the filePath after it's returned. For that you can call your new CreateFile with AFPP support and then call Win32's hANDLEToHandle again
Bodigrim commented 5 months ago

Yes, please! This is what I dearly miss from file-io at the moment. I'd be able to use OsPath much more if there were functions similar to temporary.