Java IO Tutorial - Java

Syntax has the following syntax.

public abstract String name()


In the following code shows how to use method.

import java.nio.file.FileStore;
import java.nio.file.FileSystem;
import java.nio.file.FileSystems;
/*w  ww  . ja v  a 2  s.c om*/
public class Main {

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

    for (FileStore store : fileSystem.getFileStores()) {

The code above generates the following result.