Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ENH: Output files written to temp, then copied to final filename when closed #748

Conversation

imikejackson
Copy link
Contributor

This is the start of a class that can assist the developer to write to a final file name in a more atomic fashion. The current API is pretty sparse but does have a few features:

Auto commit the temporary file to final file name when the class is destroyed. I bet there would be issues with this so we may want to rethink this idea. Mainly throwing exceptions in destructors.

The class will generate a random file extension to use at the same level as the original file.

There is an API to remove the temp file.

@JDuffeyBQ Please review this first pass and let me know your thoughts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant