Closed awtkns closed 3 years ago
motivation behind it is to ensure we have a valid file name / file is writable / can overwrite existing files. I'm not sure if we can do this with those methods (initially the path will probably be empty so .exists() would be false. Issue arises since .exists() also just returns false with invalid file names)
As for closing, python should handle closing it eventually but I added a close to be sure
Two small things here:
Path.exsists() && Path.is_file()
https://github.com/qurit/rt-utils/blob/26447ff98d271df6f978073c7aa3f2803d8943d7/rt_utils/rtstruct.py#L54-L61