{"id":36417130,"url":"https://github.com/javaquery/ftpclient","last_synced_at":"2026-01-11T17:00:28.038Z","repository":{"id":71219516,"uuid":"388667111","full_name":"javaquery/ftpclient","owner":"javaquery","description":"Java FTP Client","archived":false,"fork":false,"pushed_at":"2025-10-30T08:31:58.000Z","size":63,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-30T10:25:26.101Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/javaquery.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2021-07-23T03:37:25.000Z","updated_at":"2025-10-30T08:32:01.000Z","dependencies_parsed_at":"2023-05-23T18:45:35.459Z","dependency_job_id":null,"html_url":"https://github.com/javaquery/ftpclient","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/javaquery/ftpclient","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/javaquery%2Fftpclient","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/javaquery%2Fftpclient/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/javaquery%2Fftpclient/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/javaquery%2Fftpclient/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/javaquery","download_url":"https://codeload.github.com/javaquery/ftpclient/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/javaquery%2Fftpclient/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28314254,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-11T14:58:17.114Z","status":"ssl_error","status_checked_at":"2026-01-11T14:55:53.580Z","response_time":60,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-01-11T17:00:16.974Z","updated_at":"2026-01-11T17:00:28.010Z","avatar_url":"https://github.com/javaquery.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# FTP Client Library\n\nA lightweight and easy-to-use Java FTP client library that provides a unified interface for FTP, FTPS, and SFTP file transfers.\n\n## Features\n\n- **Unified Interface**: Single API for FTP, FTPS, and SFTP protocols\n- **Simple Integration**: Easy to integrate with minimal configuration\n- **File Operations**: Upload, download, delete, and list files\n- **File Filtering**: Filter files based on custom criteria\n- **Timeout Configuration**: Configurable connection and socket timeouts\n- **Secure Connections**: Support for FTPS (FTP over SSL/TLS) and SFTP (SSH File Transfer Protocol)\n\n## Dependencies\n\nThis library uses the following dependencies:\n- Apache Commons Net (for FTP/FTPS)\n- JSch (for SFTP)\n- Lombok (for cleaner code)\n- SLF4J (for logging)\n\n## Installation\n\n### Gradle\n\n```gradle\ndependencies {\n    implementation 'com.javaquery:ftpclient:1.0.0'\n}\n```\n\n### Maven\n\n```xml\n\u003cdependency\u003e\n    \u003cgroupId\u003ecom.javaquery\u003c/groupId\u003e\n    \u003cartifactId\u003eftpclient\u003c/artifactId\u003e\n    \u003cversion\u003e1.0.0\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\n## Quick Start\n\n```java\nimport com.javaquery.ftp.Credentials;\nimport com.javaquery.ftp.FTPType;\nimport com.javaquery.ftp.JFTPClient;\n\npublic class FTPExample {\n    public static void main(String[] args) {\n        // Create credentials\n        Credentials credentials = Credentials.builder()\n                .host(\"ftp.example.com\")\n                .port(21)\n                .username(\"your-username\")\n                .password(\"your-password\")\n                .build();\n\n        // Create FTP client (use FTPType.FTPS or FTPType.SFTP for secure connections)\n        JFTPClient ftpClient = new JFTPClient(FTPType.FTP);\n        \n        try {\n            // Connect to server\n            ftpClient.connect(credentials);\n            System.out.println(\"Connected successfully!\");\n            \n            // Perform file operations here\n            \n        } catch (Exception e) {\n            e.printStackTrace();\n        } finally {\n            // Disconnect\n            ftpClient.disconnect();\n        }\n    }\n}\n```\n\n## API Reference\n\n### JFTPClient\n\nMain client class for FTP operations.\n\n#### Constructor\n- `JFTPClient(FTPType ftpType)` - Creates a new client instance for the specified protocol type\n\n#### Methods\n- `void connect(Credentials credentials)` - Establishes connection to the FTP server\n- `void disconnect()` - Closes the connection to the FTP server\n- `List\u003cRemoteFile\u003e listFiles(String directoryPath, FileFilter\u003cRemoteFile\u003e fileFilter)` - Lists files in the specified directory with optional filtering\n- `boolean uploadFile(String localFilePath, String remoteFilePath)` - Uploads a file to the server\n- `boolean downloadFile(String remoteFilePath, String localFilePath)` - Downloads a file from the server\n- `boolean deleteFile(String remoteFilePath)` - Deletes a file from the server\n\n### FTPType\n\nEnum for specifying the protocol type.\n\n**Values:**\n- `FTP` - Standard FTP protocol\n- `FTPS` - FTP over SSL/TLS\n- `SFTP` - SSH File Transfer Protocol\n\n### Credentials\n\nBuilder class for connection credentials.\n\n**Properties:**\n- `host` - FTP server hostname or IP address\n- `port` - FTP server port (default: 21 for FTP/FTPS, 22 for SFTP)\n- `username` - Username for authentication\n- `password` - Password for authentication\n- `connectTimeout` - Connection timeout in milliseconds (default: 15000)\n- `socketTimeout` - Socket timeout in milliseconds (default: 60000)\n- `isImplicit` - Use implicit FTPS mode (default: false)\n\n### RemoteFile\n\nRepresents a file or directory on the remote server.\n\n**Properties:**\n- `name` - File or directory name\n- `isFile` - Whether this is a file\n- `isDirectory` - Whether this is a directory\n- `size` - File size in bytes\n- `timestamp` - Last modified timestamp\n- `path` - Full path on the server\n\n### FileFilter\n\nFunctional interface for filtering files.\n\n**Method:**\n- `boolean accept(RemoteFile file)` - Returns true if the file should be included in the results\n\n## Error Handling\n\nThe library throws `FTPException` for all FTP-related errors. Always wrap operations in try-catch blocks:\n\n```java\ntry {\n    ftpClient.connect(credentials);\n    // Perform operations\n} catch (FTPException e) {\n    System.err.println(\"FTP Error: \" + e.getMessage());\n    e.printStackTrace();\n} finally {\n    ftpClient.disconnect();\n}\n```\n\n## Best Practices\n\n1. **Always disconnect**: Use try-finally blocks to ensure disconnection\n2. **Configure timeouts**: Set appropriate timeout values based on your network conditions\n3. **Handle exceptions**: Properly handle `FTPException` in your code\n4. **Use filters**: Leverage `FileFilter` for efficient file listing\n5. **Validate paths**: Ensure file paths are valid before operations\n6. **Logging**: Configure SLF4J for proper logging support\n\n## Requirements\n\n- Java 8 or higher\n- Internet connectivity to FTP server\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjavaquery%2Fftpclient","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjavaquery%2Fftpclient","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjavaquery%2Fftpclient/lists"}