Closed jbrown299 closed 3 years ago
Hi James. I don't feel strongly either way, but I don't see the second as being an advantage...
And we can use it when we want save to disk such document with this default file name.
Stem never writes into tor's cache directory. These filenames are an internal implementation detail of the tor process, and liable to change at any time. We only do the above matching as a convenience for our users (so parse_file()
can read from the cache directory without a descriptor_type argument).
Feel free to reopen if moving these to a class constant can provide a more significant benefit.
There is code inside parse_file function which determinate type of descryptor by file name:
So we can add for each type of descriptor some class variable which store default cache file name. Profit: We can use it here above. And we can use it when we want save to disk such document with this default file name.