| 1 |
/* |
| 2 |
* Copyright 2004-2023 H2 Group. Multiple-Licensed under the MPL 2.0, |
| 3 |
* and the EPL 1.0 (https://h2database.com/html/license.html). |
| 4 |
* Initial Developer: H2 Group |
| 5 |
*/ |
| 6 |
package org.h2.store.fs.async; |
| 7 |
|
| 8 |
import java.io.IOException; |
| 9 |
import java.nio.channels.FileChannel; |
| 10 |
import org.h2.store.fs.FilePathWrapper; |
| 11 |
|
| 12 |
/** |
| 13 |
* This file system stores files on disk and uses |
| 14 |
* java.nio.channels.AsynchronousFileChannel to access the files. |
| 15 |
*/ |
| 16 |
public class FilePathAsync extends FilePathWrapper { |
| 17 |
|
| 18 |
@Override |
| 19 |
public FileChannel open(String mode) throws IOException { |
| 20 |
return new FileAsync(name.substring(getScheme().length() + 1), mode); |
| 21 |
} |
| 22 |
|
| 23 |
@Override |
| 24 |
public String getScheme() { |
| 25 |
return "async"; |
| 26 |
} |
| 27 |
|
| 28 |
} |