Hi,
Thanks for making this library. I'm using it in a personal project and I find it generally very nice to work with.
In my project I need to create sequentially numbered files like 0000.log, 0001.log, etc, one per boot. When a given file name already exists I need to create the file with the next number. Dir::create_file opens the file if it already exists. It would very convenient to have a create_new_file that returns an error when the file already exists. This way I could create a new file in a loop, incrementing the file number until it succeeds.
I haven't looked in detail yet what it would take to implement this but I did see there is already a suitable error variant.
Hi,
Thanks for making this library. I'm using it in a personal project and I find it generally very nice to work with.
In my project I need to create sequentially numbered files like
0000.log,0001.log, etc, one per boot. When a given file name already exists I need to create the file with the next number.Dir::create_fileopens the file if it already exists. It would very convenient to have acreate_new_filethat returns an error when the file already exists. This way I could create a new file in a loop, incrementing the file number until it succeeds.I haven't looked in detail yet what it would take to implement this but I did see there is already a suitable error variant.