Create icommand irmdir
rskarbez opened this issue · comments
Rick Skarbez commented
Functionality would be the same as Unix rmdir.
Requested in irods/irods#3117.
Terrell Russell commented
please cherry-pick to 4-2-stable
Matthew Astley commented
Thanks for implementing it. I skimmed the code (possibly misunderstanding it in the process) and wondered, does it give the same safety guarantees as the POSIX equivalent?
- check the collection is empty - yes.
- equivalent to
irm -r
, wrapped asirmdir
This is fine until,
- without getting an exclusive lock on the collection,
- check the collection is empty - yes.
- some other client sneaks in and writes a file
- equivalent to
irm -r
, wrapped asirmdir
- disappointment and data loss?
Could you make the safety guarantee, or lack of, explicit in the irmdir -h
text please?
Rick Skarbez commented
Thanks for checking this; I hadn't considered that potential case. I will certainly update the help text, and will look into what it would take to make the equivalent safety guarantees as the POSIX equivalent.