An atomic action is one that effectively happens all at once.
An example of atomicity is ordering an airline ticket where two actions are required: payment, and a seat reservation. The potential passenger must either:
In the context of a transaction , either all the tasks in a transaction must happen, or none of them. The transaction must be completed, or else it must be undone (rolled back).
This functionality is known as atomic commit.
A file deletion should be atomic.
If a request to delete a file is send to the file system and the power is lost during the delete operation, once power is restored either:
If after power is restored the file is only partially deleted, if some of its data has been altered or erased, or the file has been truncated but not completely removed, then data corruption/inconsistency will likely result.