'getScheme' method returns the URI scheme that identifies
this provider.
App.java
package com.sample.app; import java.io.IOException; import java.nio.file.FileSystem; import java.nio.file.Path; import java.nio.file.Paths; import java.nio.file.spi.FileSystemProvider; public class App { public static void main(String args[]) throws IOException { Path path = Paths.get("/Users/krishna/documents"); FileSystem fileSystem = path.getFileSystem(); FileSystemProvider fileSystemProvider = fileSystem.provider(); System.out.println("Scheme : " + fileSystemProvider.getScheme()); } }
Output
Scheme : file
No comments:
Post a Comment