google / renameio

Package renameio provides a way to atomically create or replace a file or symbolic link.
Apache License 2.0
609 stars 27 forks source link

Add TempFile Directoy parameter to WriteFile #32

Closed FF-AntiK closed 3 years ago

FF-AntiK commented 3 years ago

https://github.com/google/renameio/blob/370b856c87755ae99ae5f93f85f113b98f216cff/writefile.go#L24

WriteFile uses an empty string as the TempFile Directory. Please add this as parameter to WriteFile.

stapelberg commented 3 years ago

No: the renameio.WriteFile method is designed to use the same signature as ioutil.WriteFile.

Use the TempFile entry point directly if you have a need to specify the directory.

FF-AntiK commented 3 years ago

I understand, thanks!