‘FileSystemProvider.installedProviders()’ return all the
installed file system providers. Usually two file system providers (file, jar)
comes with jdk.
App.java
package com.sample.app; import java.nio.file.spi.FileSystemProvider; import java.util.List; public class App { public static void main(String args[]) { List<FileSystemProvider> fileSystemProviders = FileSystemProvider.installedProviders(); for(FileSystemProvider fileSystemProvider : fileSystemProviders) { System.out.println(fileSystemProvider.getScheme()); } } }
Output
file
jar
No comments:
Post a Comment