Skip to content

Commit 22818a8

Browse files
committed
Updated parent version, site model and README
1 parent a01567a commit 22818a8

File tree

3 files changed

+18
-12
lines changed

3 files changed

+18
-12
lines changed

README.md

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,11 @@ The `ftp-fs` library provides support for FTP and FTPS NIO.2 file systems, allow
1111

1212
If the FTP file system library is available on the class path, it will register [FileSystemProviders](https://docs.oracle.com/javase/8/docs/api/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/javase/8/docs/api/java/nio/file/FileSystems.html). You can use classes [FTPEnvironment](https://robtimus.github.io/ftp-fs/apidocs/com/github/robtimus/filesystems/ftp/FTPEnvironment.html) and [FTPSEnvironment](https://robtimus.github.io/ftp-fs/apidocs/com/github/robtimus/filesystems/ftp/FTPSEnvironment.html) to help create the environment maps for those methods:
1313

14-
FTPEnvironment env = new FTPEnvironment()
15-
.withCredentials(username, password);
16-
FileSystem fs = FileSystems.newFileSystem(URI.create("ftp://example.org"), env);
14+
```java
15+
FTPEnvironment env = new FTPEnvironment()
16+
.withCredentials(username, password);
17+
FileSystem fs = FileSystems.newFileSystem(URI.create("ftp://example.org"), env);
18+
```
1719

1820
### Providing credentials
1921

@@ -33,10 +35,12 @@ The default directory can be provided through the URI or trough the environment
3335

3436
After a file system has been created, [Paths](https://docs.oracle.com/javase/8/docs/api/java/nio/file/Path.html) can be created through the file system itself using its [getPath](https://docs.oracle.com/javase/8/docs/api/java/nio/file/FileSystem.html#getPath-java.lang.String-java.lang.String...-) method. As long as the file system is not closed, it's also possible to use [Paths.get](https://docs.oracle.com/javase/8/docs/api/java/nio/file/Paths.html#get-java.net.URI-). Note that if the file system was created with credentials, the username must be part of the URL. For instance:
3537

36-
// created without credentials
37-
Path path1 = Paths.get(URI.create("ftp://example.org"));
38-
// created with credentials
39-
Path path2 = Paths.get(URI.create("ftp://[email protected]"));
38+
```java
39+
// created without credentials
40+
Path path1 = Paths.get(URI.create("ftp://example.org"));
41+
// created with credentials
42+
Path path2 = Paths.get(URI.create("ftp://[email protected]"));
43+
```
4044

4145
If 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/FTPEnvironment.html#setDefault-com.github.robtimus.filesystems.ftp.FTPEnvironment-) or [FTPSEnvironment.setDefault](https://robtimus.github.io/ftp-fs/apidocs/com/github/robtimus/filesystems/ftp/FTPSEnvironment.html#setDefault-com.github.robtimus.filesystems.ftp.FTPSEnvironment-) and query parameters; see usages of [QueryParam](https://robtimus.github.io/ftp-fs/apidocs/com/github/robtimus/filesystems/ftp/class-use/FTPEnvironment.QueryParam.html) and [QueryParams](https://robtimus.github.io/ftp-fs/apidocs/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/javase/8/docs/api/java/nio/file/FileSystemNotFoundException.html) will be thrown.
4246

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
<parent>
2323
<groupId>com.github.robtimus</groupId>
2424
<artifactId>robtimus-parent</artifactId>
25-
<version>1.14</version>
25+
<version>1.15</version>
2626
<relativePath />
2727
</parent>
2828

src/site/site.xml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,11 @@
1515
limitations under the License.
1616
-->
1717

18-
<project name="ftp-fs"
19-
xmlns="http://maven.apache.org/DECORATION/1.8.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
20-
xsi:schemaLocation="http://maven.apache.org/DECORATION/1.8.0 https://maven.apache.org/xsd/decoration-1.8.0.xsd">
18+
<site name="ftp-fs"
19+
xmlns="http://maven.apache.org/SITE/2.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
20+
xsi:schemaLocation="http://maven.apache.org/SITE/2.0.0 https://maven.apache.org/xsd/site-2.0.0.xsd">
21+
22+
<bannerLeft name="ftp-fs" />
2123

2224
<body>
2325
<menu name="ftp-fs">
@@ -27,4 +29,4 @@
2729
<item name="Javadoc" href="apidocs/index.html" />
2830
</menu>
2931
</body>
30-
</project>
32+
</site>

0 commit comments

Comments
 (0)