Friday, June 19, 2015

io to nio

File folder=new Folder("D:\\");

File[] files = folder.listFiles(new FilenameFilter() {
public boolean accept(File dir, String name) {
return name.toLowerCase().endsWith("" + FILE_EXT + "");
}
});

Path dir=Paths.get("D:\\");
DirectoryStream<Path> stream = Files.newDirectoryStream(dir, "*.{" + FILE_EXT + "}");

No comments:

Post a Comment

Going one step further with Kotlin & gRPC

Recently, I tried using Quarkus with Kotlin for grpc. I have worked with grpc for communication between microservices in Java & Golang. ...