spring-projects / spring-projects/spring-integration

Extend FileExistsMode with RENAME mode [INT-4475]

Open
#8,413 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

in: file in: ftp type: enhancement
Dominant language
Java
Stars
1.6k
Forks
1.2k
Avg merge
17h 48m
Merged PRs (30d)
62

Description

Martins M opened INT-4475 and commented

Currently classes that make use of org.springframework.integration.file.support.FileExistsMode does not have an option to rename the new file if one already exists. The simplest renaming implementation could just add to a filename a suffix consisting of a current timestamp in millis.

Yes, this functionality can be achieved in other ways (e.g. via advice) however having inbuilt RENAME mode would make it more concise and readable.

Obviously all the handler classes would have to be updated to handle the new mode.

Is there a specific reason why this haven't been implemented (e.g. considered not needed)?

 


No further details from INT-4475

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating org.springframework.integration.file.support.FileExistsMode and the handler classes that use it. Review how existing file-existence modes are handled, then implement and verify a RENAME mode that appends a current-millis timestamp when the target file already exists and ensure all affected handlers support it.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, spring
Domain
backend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.