Example usage for java.nio.file FileStore getAttribute

List of usage examples for java.nio.file FileStore getAttribute

Introduction

In this page you can find the example usage for java.nio.file FileStore getAttribute.

Prototype

public abstract Object getAttribute(String attribute) throws IOException;

Source Link

Document

Reads the value of a file store attribute.

Usage

From source file:Main.java

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

    for (FileStore store : fileSystem.getFileStores()) {
        boolean compression = (Boolean) store.getAttribute("zfs:compression");

    }// ww w.  ja  va2 s. co  m
}