Message61216
tempfile provides a very convenient API but it seems to
miss one important use case. For example, suppose the
program is stream editing the file. Typically one reads
the source file, edits the data, and writes it to a
temporary file. Upon successful completion of the edit,
the program renames the temporary to be the original
source file, which is atomic in most operating systems,
There does not appear to be any neat way to do this with
the current API without the program throwing an
exception because of the deletion wrapper. Perhaps a
"rename" method needs to be added to manage the delete
seamlessly. I am not especially fond of that solution
as it adds new functionality to file descriptors.
. |
|
Date |
User |
Action |
Args |
2008-01-20 09:59:43 | admin | link | issue1390197 messages |
2008-01-20 09:59:43 | admin | create | |
|