Open
Description
hello, I found that the std::fs::write function is quite slow when writing to the same file, I was very surprised why this is so and then I used open options and found that if I put truncate true then that was the cause of the slowdown and then I created a function where I changed the length of the file only at the end after writing, but only if the new length of the data was smaller than the original file size, and therefore I want to ask if it is possible to apply something like this in the std::fs::write method?