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

Files: Implements methods isHidden and isMetadata to check if a path is either hidden or a type of metadata file #544

Merged
merged 23 commits into from
Dec 11, 2024

Conversation

scireum-mbo
Copy link
Contributor

Additional Notes

Checklist

  • Code change has been tested and works locally
  • Code was formatted via IntelliJ and follows SonarLint & best practices
  • Patch Tasks: Is local execution of Patch Tasks necessary? If so, please also mark the PR with the tag.

@scireum-mbo scireum-mbo added the 🧬 Enhancement Contains new features label Dec 10, 2024
src/main/java/sirius/kernel/commons/Files.java Outdated Show resolved Hide resolved
src/main/java/sirius/kernel/commons/Files.java Outdated Show resolved Hide resolved
src/main/java/sirius/kernel/commons/Files.java Outdated Show resolved Hide resolved
src/main/java/sirius/kernel/commons/Files.java Outdated Show resolved Hide resolved
This is done because we validate a string and don't use any file-system feature.

Fixes: SIRI-1028
Copy link
Contributor

@idlira idlira left a comment

Choose a reason for hiding this comment

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

One more note regarding validating longer path.
Perhaps a test case can be added to check these methods.

src/main/java/sirius/kernel/commons/Files.java Outdated Show resolved Hide resolved
src/main/java/sirius/kernel/commons/Files.java Outdated Show resolved Hide resolved
src/main/java/sirius/kernel/commons/Files.java Outdated Show resolved Hide resolved
Fixes: SIRI-1028
…n subfolders

Unfortunately this decreases search precision due to checking the entire string instead of just the beginning.

Fixes: SIRI-1028
Fixes: SIRI-1028
src/main/java/sirius/kernel/commons/Files.java Outdated Show resolved Hide resolved
@scireum-mbo scireum-mbo merged commit 1cb8647 into develop Dec 11, 2024
3 checks passed
@scireum-mbo scireum-mbo deleted the feature/mbo/SIRI-1028 branch December 11, 2024 08:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🧬 Enhancement Contains new features
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants