Skip to content

Enable LastModifiedFileListFilters to discard files that are too old #9869

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

Closed
mrnst opened this issue Feb 27, 2025 · 1 comment
Closed

Enable LastModifiedFileListFilters to discard files that are too old #9869

mrnst opened this issue Feb 27, 2025 · 1 comment

Comments

@mrnst
Copy link

mrnst commented Feb 27, 2025

Current Behavior

Currently, Spring Integrations FileListFilters on the last modified attribute of a file are limited to the use case of discarding files that are too young.

Expected Behavior

Spring Integrations FileListFilters on the last modified attribute should be extended to the use case of discarding files that are too old.

Context

As stated by @artembilan in the stack overflow thread referenced below this feature may be implemented by adding to AbstractLastModifiedFileListFilter a new boolean property that can be used to negate the currently implemented filter predicate.

This issue is related to this stack overflow question.

@mrnst mrnst added status: waiting-for-triage The issue need to be evaluated and its future decided type: enhancement labels Feb 27, 2025
@artembilan artembilan added this to the 6.5.0-M3 milestone Feb 27, 2025
@artembilan artembilan added in: sftp in: file in: ftp in: smb and removed status: waiting-for-triage The issue need to be evaluated and its future decided labels Feb 27, 2025
@artembilan
Copy link
Member

I decided to go with more granular way and introduced AbstractRecentFileListFilter.
It is similar to the LastModified one, but just does an opposite check.
So, we can combine two of them in our configuration to achieve a behavior like: accept only files which are in their "ripe" age.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants