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

Update delete_files() helper function #3162

Merged
merged 2 commits into from
Jun 25, 2020

Conversation

michalsn
Copy link
Member

Description
Support for removing hidden folders. See: #3015

Checklist:

  • Securely signed commits
  • Component(s) with PHPdocs
  • Unit testing, with >80% coverage
  • User guide updated
  • Conforms to style guide

@michalsn michalsn changed the title Update delete_files() helper function. Fixes #3015 Update delete_files() helper function Jun 24, 2020
@michalsn michalsn requested a review from MGatner June 24, 2020 15:19
Copy link
Member

@MGatner MGatner left a comment

Choose a reason for hiding this comment

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

This is exactly what I was looking for! I looks good. My only thought is that it duplicates a fair amount of functionality from get_filenames(). Does it make sense to leverage that function to gather the files and just use this to delete them? Or is that kind of inter-dependence undesirable in helper functions, in case somewhere were to (say) overwrite them?

@michalsn
Copy link
Member Author

The thing is that we need our files to be in a certain order so we can delete them and get_filenames() function doesn't give us that.

Of course, we can work on the result returned by get_filenames() but it won't be very pretty. I would stay with the current approach, even if these two functions are a bit similar.

Copy link
Member

@MGatner MGatner left a comment

Choose a reason for hiding this comment

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

Good point! I’m happy with this one. I actually have a few projects I will go update once this is merged. 😋

@michalsn
Copy link
Member Author

I'm not sure why Coveralls show decreased test coverage. I will say it's a mistake and merge.

@michalsn michalsn merged commit 8e0f4c9 into codeigniter4:develop Jun 25, 2020
@MGatner
Copy link
Member

MGatner commented Jun 25, 2020

I’ve found the Coveralls CI to be unreliable on small PRs. Not worried about it.

@michalsn michalsn deleted the delete_files branch July 16, 2020 13:31
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