I try to solve the following problem and I cannot figure out the right
combination of OpenFile arguments.
I am writing a cp clone with a twist:
When I copy a directory hierarchy into another, I _never_ want to overwrite
files. If a file with the exact name already
exists, I want to rename the new file with a new suffix, incrementing a
fileA shall be copied to a folder, but fileA is already there, so the new
fileA is renamed to fileA.001 (of course
assuming that fileA.001 does not exist.)
So, how do I open the new fileA for writing, such that it will fail if it
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firstname.lastname@example.org.
For more options, visit https://groups.google.com/d/optout.