Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make os.remove behave more like Files.deleteIfExists, add checkExists flag to fall back to old behavior #89

Merged
merged 1 commit into from
Dec 9, 2021

Conversation

lihaoyi
Copy link
Member

@lihaoyi lihaoyi commented Dec 9, 2021

Follow up from the discussion in #86. As discussed, we hope that it would be more intuitive to avoid failing loudly if a file we want to delete already doesn't exist. If the user cares, they can always check the returned Boolean, or pass checkExists = true if they want the exception

CC @iulian-db

Review by @lefou @sake92

@lihaoyi lihaoyi requested review from lefou and sake92 December 9, 2021 14:46
Copy link
Member

@lefou lefou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. We should bump the minor version when releasing.

os/src/FileOps.scala Show resolved Hide resolved
@lihaoyi lihaoyi merged commit 460f8e8 into master Dec 9, 2021
@lefou lefou deleted the remove-dont-throw branch July 28, 2022 09:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants