Java FileSystem.provider()

Syntax

FileSystem.provider() has the following syntax.

public abstract FileSystemProvider provider()

Example

In the following code shows how to use FileSystem.provider() method.


import java.nio.file.FileSystem;
import java.nio.file.FileSystems;
import java.nio.file.spi.FileSystemProvider;
//from w w w .j  a va 2 s  . c  om
public class Main {

    public static void main(String[] args) {
        FileSystem fileSystem = FileSystems.getDefault();
        FileSystemProvider provider = fileSystem.provider();

        System.out.println("Provider: " + provider.toString());
  
    }
}

The code above generates the following result.





















Home »
  Java Tutorial »
    java.nio.file »




DirectoryStream.Filter
Files
FileStore
FileSystem
FileVisitor
Path
Paths
WatchService