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

Simplify StFBVisibleFilter implementation #619

Closed
astares opened this issue Nov 21, 2023 · 1 comment · Fixed by #620
Closed

Simplify StFBVisibleFilter implementation #619

astares opened this issue Nov 21, 2023 · 1 comment · Fixed by #620

Comments

@astares
Copy link
Contributor

astares commented Nov 21, 2023

As pharo-project/pharo#15501 has been integrated today into Pharo 12 it is much easier to
test a file reference if it is visible or hidden using the #isHidden method.

We can therefore simplify and

  • remove the the OS specific code in StFBVisibleFilter>>#predicate: and use #isHidden in this method
  • remove the Windows specific extension methods to FileReference from package "NewTools-FileBrowser"
@astares
Copy link
Contributor Author

astares commented Nov 21, 2023

So from

predicate: aFileReference

	OSPlatform current isWindows ifTrue: [ 
		^ aFileReference isHiddenInWindows not ].
	^ (aFileReference basename matchesRegex: '\.[^.].*') not

we can reduce to

predicate: aFileReference
	 
	^ aFileReference isHidden not

@astares astares changed the title Simply StFBVisibleFilter implementation Simplify StFBVisibleFilter implementation Nov 21, 2023
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 a pull request may close this issue.

1 participant