-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feature: adds experimental support for creating a bucket. (#406)
* feature: adds support for creating a bucket via the FileSystems.newFileSystem(URI, Map) method. * disables tests that enforced NotImplemented exceptions on newFileSystem
- Loading branch information
1 parent
49be81e
commit 31dbe23
Showing
5 changed files
with
94 additions
and
30 deletions.
There are no files selected for viewing
20 changes: 20 additions & 0 deletions
20
src/examples/java/software/amazon/nio/spi/examples/CreateBucket.java
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
/* | ||
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
package software.amazon.nio.spi.examples; | ||
|
||
import java.io.IOException; | ||
import java.net.URI; | ||
import java.nio.file.FileSystems; | ||
import java.util.Map; | ||
|
||
public class CreateBucket { | ||
public static void main(String[] args) throws IOException { | ||
try (var fs = FileSystems.newFileSystem(URI.create(args[0]), | ||
Map.of("locationConstraint", "us-east-1"))) { | ||
System.out.println(fs.toString()); | ||
} | ||
} | ||
} |
This file contains 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
This file contains 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
This file contains 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
This file contains 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