forked from kubevirt/kubevirt
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ephemeral-disk-utils: simplify and rename RemoveFile
We would like RemoveFile to remove a file that may already exists from a former attemt to reconcile a resource. We do not want it to do anything more. E.g. if it finds a whole directory tree there, it is probably a programmatic error that should be reported as such. This commit renames the function to RemoveFilesIfExist, to make the intended functionality clear, and modify the implemenetation to be more careful and return an error if the on-disk situation is unexpected. It also extends the signature to allow this type of optional removal of multiple files. Signed-off-by: Dan Kenigsberg <[email protected]>
- Loading branch information
1 parent
3fe3349
commit 71c921c
Showing
6 changed files
with
28 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters