{"id":20741109,"url":"https://github.com/robtimus/ftp-fs","last_synced_at":"2026-04-18T13:05:24.188Z","repository":{"id":50597372,"uuid":"77142661","full_name":"robtimus/ftp-fs","owner":"robtimus","description":"An FTP(S) NIO.2 file system","archived":false,"fork":false,"pushed_at":"2026-04-17T17:25:31.000Z","size":1764,"stargazers_count":15,"open_issues_count":0,"forks_count":9,"subscribers_count":3,"default_branch":"master","last_synced_at":"2026-04-17T19:27:34.635Z","etag":null,"topics":["filesystem","ftp","java","nio2"],"latest_commit_sha":null,"homepage":"https://robtimus.github.io/ftp-fs/","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/robtimus.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","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":"2016-12-22T12:26:05.000Z","updated_at":"2026-04-17T17:25:35.000Z","dependencies_parsed_at":"2023-02-17T23:45:24.299Z","dependency_job_id":"fc73d7c9-13e7-4552-a87a-7b3f8197b33a","html_url":"https://github.com/robtimus/ftp-fs","commit_stats":null,"previous_names":[],"tags_count":28,"template":false,"template_full_name":null,"purl":"pkg:github/robtimus/ftp-fs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robtimus%2Fftp-fs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robtimus%2Fftp-fs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robtimus%2Fftp-fs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robtimus%2Fftp-fs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/robtimus","download_url":"https://codeload.github.com/robtimus/ftp-fs/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robtimus%2Fftp-fs/sbom","scorecard":{"id":269922,"data":{"date":"2025-08-11","repo":{"name":"github.com/robtimus/ftp-fs","commit":"631f101cc9676274e81847ec3536d6b75740472a"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.4,"checks":[{"name":"Code-Review","score":0,"reason":"Found 0/30 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Maintained","score":3,"reason":"4 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 3","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE.txt:0","Info: FSF or OSI recognized license: Apache License 2.0: LICENSE.txt:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yml:60: update your workflow using https://app.stepsecurity.io/secureworkflow/robtimus/ftp-fs/build.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yml:62: update your workflow using https://app.stepsecurity.io/secureworkflow/robtimus/ftp-fs/build.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yml:73: update your workflow using https://app.stepsecurity.io/secureworkflow/robtimus/ftp-fs/build.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yml:75: update your workflow using https://app.stepsecurity.io/secureworkflow/robtimus/ftp-fs/build.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yml:32: update your workflow using https://app.stepsecurity.io/secureworkflow/robtimus/ftp-fs/build.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yml:34: update your workflow using https://app.stepsecurity.io/secureworkflow/robtimus/ftp-fs/build.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yml:45: update your workflow using https://app.stepsecurity.io/secureworkflow/robtimus/ftp-fs/build.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yml:47: update your workflow using https://app.stepsecurity.io/secureworkflow/robtimus/ftp-fs/build.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/dependency-review.yml:24: update your workflow using https://app.stepsecurity.io/secureworkflow/robtimus/ftp-fs/dependency-review.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/dependency-review.yml:26: update your workflow using https://app.stepsecurity.io/secureworkflow/robtimus/ftp-fs/dependency-review.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release-site.yml:28: update your workflow using https://app.stepsecurity.io/secureworkflow/robtimus/ftp-fs/release-site.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release-site.yml:30: update your workflow using https://app.stepsecurity.io/secureworkflow/robtimus/ftp-fs/release-site.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/release-site.yml:44: update your workflow using https://app.stepsecurity.io/secureworkflow/robtimus/ftp-fs/release-site.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/sonarcloud.yml:31: update your workflow using https://app.stepsecurity.io/secureworkflow/robtimus/ftp-fs/sonarcloud.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/sonarcloud.yml:35: update your workflow using https://app.stepsecurity.io/secureworkflow/robtimus/ftp-fs/sonarcloud.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/sonarcloud.yml:57: update your workflow using https://app.stepsecurity.io/secureworkflow/robtimus/ftp-fs/sonarcloud.yml/master?enable=pin","Info:   0 out of  14 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   2 third-party GitHubAction dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/build.yml:1","Warn: no topLevel permission defined: .github/workflows/dependency-review.yml:1","Warn: topLevel 'contents' permission set to 'write': .github/workflows/release-site.yml:22","Warn: no topLevel permission defined: .github/workflows/sonarcloud.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Signed-Releases","score":0,"reason":"Project has not signed or included provenance with any releases.","details":["Warn: release artifact 3.3 not signed: https://api.github.com/repos/robtimus/ftp-fs/releases/178567641","Warn: release artifact 3.2 not signed: https://api.github.com/repos/robtimus/ftp-fs/releases/133465772","Warn: release artifact 3.1.1 not signed: https://api.github.com/repos/robtimus/ftp-fs/releases/94511369","Warn: release artifact 3.1 not signed: https://api.github.com/repos/robtimus/ftp-fs/releases/84918509","Warn: release artifact 3.0.1 not signed: https://api.github.com/repos/robtimus/ftp-fs/releases/81455851","Warn: release artifact 3.3 does not have provenance: https://api.github.com/repos/robtimus/ftp-fs/releases/178567641","Warn: release artifact 3.2 does not have provenance: https://api.github.com/repos/robtimus/ftp-fs/releases/133465772","Warn: release artifact 3.1.1 does not have provenance: https://api.github.com/repos/robtimus/ftp-fs/releases/94511369","Warn: release artifact 3.1 does not have provenance: https://api.github.com/repos/robtimus/ftp-fs/releases/84918509","Warn: release artifact 3.0.1 does not have provenance: https://api.github.com/repos/robtimus/ftp-fs/releases/81455851"],"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-17T13:06:09.394Z","repository_id":50597372,"created_at":"2025-08-17T13:06:09.394Z","updated_at":"2025-08-17T13:06:09.394Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31969787,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-18T00:39:45.007Z","status":"online","status_checked_at":"2026-04-18T02:00:07.018Z","response_time":103,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["filesystem","ftp","java","nio2"],"created_at":"2024-11-17T06:33:52.584Z","updated_at":"2026-04-18T13:05:24.182Z","avatar_url":"https://github.com/robtimus.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ftp-fs\n[![Maven Central](https://img.shields.io/maven-central/v/com.github.robtimus/ftp-fs)](https://search.maven.org/artifact/com.github.robtimus/ftp-fs)\n[![Build Status](https://github.com/robtimus/ftp-fs/actions/workflows/build.yml/badge.svg)](https://github.com/robtimus/ftp-fs/actions/workflows/build.yml)\n[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=com.github.robtimus%3Aftp-fs\u0026metric=alert_status)](https://sonarcloud.io/summary/overall?id=com.github.robtimus%3Aftp-fs)\n[![Coverage](https://sonarcloud.io/api/project_badges/measure?project=com.github.robtimus%3Aftp-fs\u0026metric=coverage)](https://sonarcloud.io/summary/overall?id=com.github.robtimus%3Aftp-fs)\n\nThe `ftp-fs` library provides support for FTP and FTPS NIO.2 file systems, allowing FTP servers to be accessed in a similar way to local file systems.\n\n## Creating file systems\n\nIf the FTP file system library is available on the class path, it will register [FileSystemProviders](https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/nio/file/spi/FileSystemProvider.html) for schemes `ftp` and `ftps`. This allows you to create FTP and FTPS file systems using the `newFileSystem` methods of class [FileSystems](https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/nio/file/FileSystems.html). You can use classes [FTPEnvironment](https://robtimus.github.io/ftp-fs/apidocs/com.github.robtimus.filesystems.ftp/com/github/robtimus/filesystems/ftp/FTPEnvironment.html) and [FTPSEnvironment](https://robtimus.github.io/ftp-fs/apidocs/com.github.robtimus.filesystems.ftp/com/github/robtimus/filesystems/ftp/FTPSEnvironment.html) to help create the environment maps for those methods:\n\n```java\nFTPEnvironment env = new FTPEnvironment()\n        .withCredentials(username, password);\nFileSystem fs = FileSystems.newFileSystem(URI.create(\"ftp://example.org\"), env);\n```\n\n### Providing credentials\n\nCredentials can be provided either through the URI or through the environment, as shown above. For security reasons the latter is preferred.\n\n### Default directory\n\nThe default directory can be provided through the URI or trough the environment using [withDefaultDirectory](https://robtimus.github.io/ftp-fs/apidocs/com.github.robtimus.filesystems.ftp/com/github/robtimus/filesystems/ftp/FTPEnvironment.html#withDefaultDirectory%28java.lang.String%29), as follows:\n\n| URI path | No default directory in the environment            | Default directory in the environment                |\n|----------|----------------------------------------------------|-----------------------------------------------------|\n| None     | The default directory is defined by the FTP server | The default directory is defined by the environment |\n| `/`      | The default directory is `/`                       | The default directory is defined by the environment |\n| Other    | The default directory is equal to the URI path     | Not allowed                                         |\n\n## Creating paths\n\nAfter a file system has been created, [Paths](https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/nio/file/Path.html) can be created through the file system itself using its [getPath](https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/nio/file/FileSystem.html#getPath%28java.lang.String,java.lang.String...%29) method. As long as the file system is not closed, it's also possible to use [Paths.get](https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/nio/file/Paths.html#get%28java.net.URI%29). Note that if the file system was created with credentials, the username must be part of the URL. For instance:\n\n```java\n// created without credentials\nPath path1 = Paths.get(URI.create(\"ftp://example.org\"));\n// created with credentials\nPath path2 = Paths.get(URI.create(\"ftp://username@example.org\"));\n```\n\nIf the username in the URI does not match the username used to create the file system, or if no file system has been created for the URI, a new file system will be created. This works like [Creating file systems](#Creating_file_systems). Since no environment can be provided this way, settings can still be provided through [FTPEnvironment.setDefault](https://robtimus.github.io/ftp-fs/apidocs/com.github.robtimus.filesystems.ftp/com/github/robtimus/filesystems/ftp/FTPEnvironment.html#setDefault%28com.github.robtimus.filesystems.ftp.FTPEnvironment%29) or [FTPSEnvironment.setDefault](https://robtimus.github.io/ftp-fs/apidocs/com.github.robtimus.filesystems.ftp/com/github/robtimus/filesystems/ftp/FTPSEnvironment.html#setDefault%28com.github.robtimus.filesystems.ftp.FTPSEnvironment%29) and query parameters; see usages of [QueryParam](https://robtimus.github.io/ftp-fs/apidocs/com.github.robtimus.filesystems.ftp/com/github/robtimus/filesystems/ftp/class-use/FTPEnvironment.QueryParam.html) and [QueryParams](https://robtimus.github.io/ftp-fs/apidocs/com.github.robtimus.filesystems.ftp/com/github/robtimus/filesystems/ftp/class-use/FTPEnvironment.QueryParams.html) for the possible query parameters. If creating a new file system fails, a [FileSystemNotFoundException](https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/nio/file/FileSystemNotFoundException.html) will be thrown.\n\n## Attributes\n\n### File attributes\n\nFTP file systems fully support read-access to the following attributes:\n\n* Attributes defined in [BasicFileAttributeView](https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/nio/file/attribute/BasicFileAttributeView.html) and [BasicFileAttributes](https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/nio/file/attribute/BasicFileAttributes.html), available both with and without prefixes `basic:` or `posix:`.\n* Attributes defined in [FileOwnerAttributeView](https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/nio/file/attribute/FileOwnerAttributeView.html), available with prefixes `owner:` or `posix:`.\n* Attributes defined in [PosixFileAttributeView](https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/nio/file/attribute/PosixFileAttributeView.html) and [PosixFileAttributes](https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/nio/file/attribute/PosixFileAttributes.html), available with prefix `posix:`.\n\nAttempting to set any of these attributes, either through one of the file attribute views or through a file system, will result in an [UnsupportedOperationException](https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/UnsupportedOperationException.html).\n\n### File store attributes\n\nWhen calling [getAttribute](https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/nio/file/FileStore.html#getAttribute%28java.lang.String%29) on a file store, the following attributes are supported:\n\n* `totalSpace`: returns the same value as the [getTotalSpace](https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/nio/file/FileStore.html#getTotalSpace%28%29) method.\n* `usableSpace`: returns the same value as the [getUsableSpace](https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/nio/file/FileStore.html#getUsableSpace%28%29) method.\n* `unallocatedSpace`: returns the same value as the [getUnallocatedSpace](https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/nio/file/FileStore.html#getUnallocatedSpace%28%29) method.\n\nBecause FTP servers do not return these values, these methods will all return `Long.MAX_VALUE`.\n\nThere is no support for [FileStoreAttributeView](https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/nio/file/attribute/FileStoreAttributeView.html). Calling [getFileStoreAttributeView](https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/nio/file/FileStore.html#getFileStoreAttributeView%28java.lang.Class%29) on a file store will simply return `null`.\n\n## FTPS support\n\nTo create an FTPS connection instead of an FTP connection, use `ftps` as the scheme. Also, use class [FTPSEnvironment](https://robtimus.github.io/ftp-fs/apidocs/com.github.robtimus.filesystems.ftp/com/github/robtimus/filesystems/ftp/FTPSEnvironment.html) instead of class [FTPEnvironment](https://robtimus.github.io/ftp-fs/apidocs/com.github.robtimus.filesystems.ftp/com/github/robtimus/filesystems/ftp/FTPEnvironment.html) to create the file system. Using an [FTPEnvironment](https://robtimus.github.io/ftp-fs/apidocs/com.github.robtimus.filesystems.ftp/com/github/robtimus/filesystems/ftp/FTPEnvironment.html) instance is still allowed, but you will not be able to specify FTPS specific properties.\n\n## Error handling\n\nUnfortunately, FTP servers can use the same code for multiple erroneous situations. For example, code 550 can indicate that a file does not exist, or that access to an existing file is not allowed. Because of this, most methods do not throw the correct exception ([NoSuchFileException](https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/nio/file/NoSuchFileException.html), [AccessDeniedException](https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/nio/file/AccessDeniedException.html), etc).\n\nTo allow this behaviour to be modified, class [FTPEnvironment](https://robtimus.github.io/ftp-fs/apidocs/com.github.robtimus.filesystems.ftp/com/github/robtimus/filesystems/ftp/FTPEnvironment.html) has method [withFileSystemExceptionFactory](https://robtimus.github.io/ftp-fs/apidocs/com.github.robtimus.filesystems.ftp/com/github/robtimus/filesystems/ftp/FTPEnvironment.html#withFileSystemExceptionFactory%28com.github.robtimus.filesystems.ftp.FileSystemExceptionFactory%29) that allows you to specify a custom [FileSystemExceptionFactory](https://robtimus.github.io/ftp-fs/apidocs/com.github.robtimus.filesystems.ftp/com/github/robtimus/filesystems/ftp/FileSystemExceptionFactory.html) implementation which will be used to create exceptions based on the reply code and string of the command that triggered the error. By default, an instance of class [DefaultFileSystemExceptionFactory](https://robtimus.github.io/ftp-fs/apidocs/com.github.robtimus.filesystems.ftp/com/github/robtimus/filesystems/ftp/DefaultFileSystemExceptionFactory.html) is used.\n\nThe `ftp-fs` library provides subclasses for [FileSystemException](https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/nio/file/FileSystemException.html) and several of its subclasses to allow the FTP server's reply code and string to be reserved. Instances of these classes can be returned by [FileSystemExceptionFactory](https://robtimus.github.io/ftp-fs/apidocs/com.github.robtimus.filesystems.ftp/com/github/robtimus/filesystems/ftp/FileSystemExceptionFactory.html) implementations as needed.\n\n## Thread safety\n\nThe FTP protocol is fundamentally not thread safe. To overcome this limitation, FTP file systems maintain multiple connections to FTP servers. The number of connections determines the number of concurrent operations that can be executed. If all connections are busy, a new operation will block until a connection becomes available. Class [FTPEnvironment](https://robtimus.github.io/ftp-fs/apidocs/com.github.robtimus.filesystems.ftp/com/github/robtimus/filesystems/ftp/FTPEnvironment.html) has method [withPoolConfig](https://robtimus.github.io/ftp-fs/apidocs/com.github.robtimus.filesystems.ftp/com/github/robtimus/filesystems/ftp/FTPEnvironment.html#withPoolConfig%28com.github.robtimus.filesystems.ftp.FTPPoolConfig%29) that allows you to configure the connection pool:\n\n* The initial pool size - the number of connections that are created when an FTP file system is created. The default is `1`.\n* The maximum pool size - the maximum number of concurrent operations. The default is `5`.\n* The maximum wait time - this determines how long to wait until a connection is available. The default is to wait indefinitely.\n* The maximum time that connections can be idle. The default is indefinitely.\n\nWhen a stream or channel is opened for reading or writing, the connection will block because it will wait for the download or upload to finish. This will not occur until the stream or channel is closed. It is therefore advised to close streams and channels as soon as possible.\n\n## Connection management\n\nBecause FTP file systems use multiple connections to an FTP server, it's possible that one or more of these connections become stale. Class [FTPFileSystemProvider](https://robtimus.github.io/ftp-fs/apidocs/com.github.robtimus.filesystems.ftp/com/github/robtimus/filesystems/ftp/FTPFileSystemProvider.html) has static method [keepAlive](https://robtimus.github.io/ftp-fs/apidocs/com.github.robtimus.filesystems.ftp/com/github/robtimus/filesystems/ftp/FTPFileSystemProvider.html#keepAlive%28java.nio.file.FileSystem%29) that, if given an instance of an FTP file system, will send a keep-alive signal (NOOP) over each of its idle connections. You should ensure that this method is called on a regular interval. An alternative is to set a maximum idle time (see [Thread safety](#Thread_safety)).\n\n## Limitations\n\nFTP file systems knows the following limitations:\n\n* All paths use `/` as separator. `/` is not allowed inside file or directory names.\n* File attributes cannot be set, either when creating files or directories or afterwards.\n* Symbolic links can be read and traversed, but not created.\n* There is no support for hard links.\n* Files can be marked as executable if the FTP server indicates it is. That does not mean the file can be executed in the local JVM.\n* [SeekableByteChannel](https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/nio/channels/SeekableByteChannel.html) is supported because it's used by [Files.createFile](https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/nio/file/Files.html#createFile%28java.nio.file.Path,java.nio.file.attribute.FileAttribute...%29). However, these channels do not support seeking specific positions or truncating.\n* There is no support for [UserPrincipalLookupService](https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/nio/file/attribute/UserPrincipalLookupService.html).\n* There is no support for [WatchService](https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/nio/file/WatchService.html).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frobtimus%2Fftp-fs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frobtimus%2Fftp-fs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frobtimus%2Fftp-fs/lists"}