Example usage for io.vertx.core.file FileSystem open

List of usage examples for io.vertx.core.file FileSystem open

Introduction

In this page you can find the example usage for io.vertx.core.file FileSystem open.

Prototype

@Fluent
FileSystem open(String path, OpenOptions options, Handler<AsyncResult<AsyncFile>> handler);

Source Link

Document

Open the file represented by path , asynchronously.

Usage

From source file:examples.FileSystemExamples.java

License:Open Source License

public void example3(FileSystem fileSystem) {
    OpenOptions options = new OpenOptions();
    fileSystem.open("myfile.txt", options, res -> {
        if (res.succeeded()) {
            AsyncFile file = res.result();
        } else {/*  www  .j  a v  a 2s . co  m*/
            // Something went wrong!
        }
    });
}