Closed lvyonghuan closed 4 months ago
👋 Thanks for reporting!
A maintainer will take a look at your issue shortly. 👀
In the meantime: We are working on Viper v2 and we would love to hear your thoughts about what you like or don't like about Viper, so we can improve or fix those issues.
⏰ If you have a couple minutes, please take some time and share your thoughts: https://forms.gle/R6faU74qPRPAzchZ9
📣 If you've already given us your feedback, you can still help by spreading the news, either by sharing the above link or telling people about this on Twitter:
https://twitter.com/sagikazarmark/status/1306904078967074816
Thank you! ❤️
Sorry, my mistake. The problem was on my end. I forgot to close the file after creating it, which led to the inability to delete it.
Preflight Checklist
Problem Description
I am using Viper to read JSON formatted files. I use this function to retrieve the file.
My program requires deleting configuration files. However, when I attempt to remove the configuration file, it prompts:
I suspect that Viper is holding onto this file, causing the deletion to fail. I tried to find a close method to release Viper's hold on the file, but I couldn't find one.
Or could there be other possibilities?
Proposed Solution
Add a close() method for viper.viper.
Alternatives Considered
No response
Additional Information
But I'm curious, given the large user base of Viper and the number of years it has been in use, it's surprising that my requirement hasn't come up before. When I searched for "The process cannot access the file because it is being used by another process" in the issues, I found only one related problem. This makes me hesitant about whether I should raise this issue. I've only been studying software design for a year, and I'm not very proficient in many things. If my understanding is incorrect, please correct me.