Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a new ftp component module to the server components set, providing FTP and SFTP file operations (upload, download, list, delete, rename) via a shared RemoteFileClient abstraction.
Changes:
- Registers the new Gradle module
server:libs:modules:components:ftpand adds its dependencies (commons-net + sshj). - Introduces the FTP component handler, connection definition, actions, and shared FTP/SFTP client implementations.
- Adds a component definition snapshot test and generated definition JSON.
Reviewed changes
Copilot reviewed 16 out of 16 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| settings.gradle.kts | Adds the new ftp component module include. |
| server/libs/modules/components/ftp/build.gradle.kts | Declares the FTP component module version and dependencies. |
| server/libs/modules/components/ftp/PLAN.md | Documents the FTP/SFTP support implementation plan and changes. |
| server/libs/modules/components/ftp/src/main/java/com/bytechef/component/ftp/FtpComponentHandler.java | Registers the FTP component, connection, actions, and tool cluster elements. |
| server/libs/modules/components/ftp/src/main/java/com/bytechef/component/ftp/connection/FtpConnection.java | Defines connection properties including the new SFTP boolean option. |
| server/libs/modules/components/ftp/src/main/java/com/bytechef/component/ftp/constant/FtpConstants.java | Adds constants used across actions/connection/client. |
| server/libs/modules/components/ftp/src/main/java/com/bytechef/component/ftp/util/RemoteFileClient.java | Adds protocol-selecting factory and common remote file operations API. |
| server/libs/modules/components/ftp/src/main/java/com/bytechef/component/ftp/util/FtpRemoteFileClient.java | Implements FTP operations using Apache Commons Net. |
| server/libs/modules/components/ftp/src/main/java/com/bytechef/component/ftp/util/SftpRemoteFileClient.java | Implements SFTP operations using sshj. |
| server/libs/modules/components/ftp/src/main/java/com/bytechef/component/ftp/action/FtpUploadFileAction.java | Adds upload action with optional directory creation. |
| server/libs/modules/components/ftp/src/main/java/com/bytechef/component/ftp/action/FtpDownloadFileAction.java | Adds download action outputting a FileEntry. |
| server/libs/modules/components/ftp/src/main/java/com/bytechef/component/ftp/action/FtpListAction.java | Adds directory listing action with optional recursion. |
| server/libs/modules/components/ftp/src/main/java/com/bytechef/component/ftp/action/FtpDeleteAction.java | Adds delete action with optional recursive directory deletion. |
| server/libs/modules/components/ftp/src/main/java/com/bytechef/component/ftp/action/FtpRenameAction.java | Adds rename/move action with optional destination directory creation. |
| server/libs/modules/components/ftp/src/test/java/com/bytechef/component/ftp/FtpComponentHandlerTest.java | Adds snapshot test asserting the component definition JSON. |
| server/libs/modules/components/ftp/src/test/resources/definition/ftp_v1.json | Adds generated v1 component definition snapshot. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
...es/components/ftp/src/main/java/com/bytechef/component/ftp/action/FtpDownloadFileAction.java
Show resolved
Hide resolved
...odules/components/ftp/src/main/java/com/bytechef/component/ftp/util/FtpRemoteFileClient.java
Outdated
Show resolved
Hide resolved
...odules/components/ftp/src/main/java/com/bytechef/component/ftp/util/FtpRemoteFileClient.java
Outdated
Show resolved
Hide resolved
...bs/modules/components/ftp/src/main/java/com/bytechef/component/ftp/action/FtpListAction.java
Outdated
Show resolved
Hide resolved
...s/modules/components/ftp/src/main/java/com/bytechef/component/ftp/util/RemoteFileClient.java
Show resolved
Hide resolved
...s/modules/components/ftp/src/main/java/com/bytechef/component/ftp/util/RemoteFileClient.java
Show resolved
Hide resolved
...odules/components/ftp/src/main/java/com/bytechef/component/ftp/connection/FtpConnection.java
Show resolved
Hide resolved
- Stream file downloads via PipedInputStream instead of buffering entire file in memory - Fix isDirectory() to use changeWorkingDirectory for non-existent paths - Check makeDirectory() return value and throw ProviderException on failure - Return null for missing modifiedAt instead of empty string - Load known_hosts for SFTP host key verification, fall back to PromiscuousVerifier - Remove hardcoded port default; auto-select 21 (FTP) or 22 (SFTP) based on protocol Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Co-Authored-By: Claude Opus 4.6 noreply@anthropic.com