Class OnbFreeSpaceProvider

  • All Implemented Interfaces:
    FreeSpaceProvider

    public class OnbFreeSpaceProvider
    extends java.lang.Object
    implements FreeSpaceProvider
    Onb Free Space Provider returns the number of bytes free Returning 0 if a given path is not writable or if free space is lower than a given minimum free space percentage
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      long getBytesFree​(java.io.File f)
      Returns the number of bytes free on the file system that the given file resides on.
      • Methods inherited from class java.lang.Object

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

      • getBytesFree

        public long getBytesFree​(java.io.File f)
        Returns the number of bytes free on the file system that the given file resides on. Will return 0 on non-existing files, on read only files and if free space is lower than given freespacepercentage (in freespacemode percent) or freespace (in freespacemode byte) in settings.
        Specified by:
        getBytesFree in interface FreeSpaceProvider
        Parameters:
        f - a given file
        Returns:
        the number of bytes free.