All Downloads are FREE. Search and download functionalities are using the official Maven repository.

android.os.StatFs Maven / Gradle / Ivy

package android.os;

import java.io.File;
import java.io.IOException;

public class StatFs {

    File file;

    public StatFs(String path) {
        file = new File(path);
    }

    public int getBlockSize() {
        try {
            return (int)file.toPath().getFileSystem().getFileStores().iterator().next().getBlockSize();
        } catch (IOException e) {
            throw new RuntimeException(e);
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy