Class FileStoreUtils


  • public class FileStoreUtils
    extends java.lang.Object
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static long tryGetSpace​(java.nio.file.FileStore filestore, PathUtils.IOToLongFunction<java.nio.file.FileStore> getSpace)
      Try and get the total space of the given filestore
      static long tryGetSpace​(java.nio.file.FileStore filestore, PathUtils.IOToLongFunction<java.nio.file.FileStore> getSpace, java.util.function.Consumer<java.io.IOException> orElse)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • tryGetSpace

        public static long tryGetSpace​(java.nio.file.FileStore filestore,
                                       PathUtils.IOToLongFunction<java.nio.file.FileStore> getSpace)
        Try and get the total space of the given filestore
        Returns:
        long value of available space if no errors Long.MAX_VALUE if on a large file system that overflows 0 on exception during IOToLongFunction
      • tryGetSpace

        public static long tryGetSpace​(java.nio.file.FileStore filestore,
                                       PathUtils.IOToLongFunction<java.nio.file.FileStore> getSpace,
                                       java.util.function.Consumer<java.io.IOException> orElse)