Package PamUtils

Class DiskSpaceFormat

java.lang.Object
PamUtils.DiskSpaceFormat

public class DiskSpaceFormat extends Object
Functions to get and display disk space in sensible units.
Author:
dg50
  • Constructor Details

    • DiskSpaceFormat

      public DiskSpaceFormat()
  • Method Details

    • getFreeSpace

      public static Long getFreeSpace(String path)
      Get the amount of space at the specified path or null if the path is not set, etc.
      Parameters:
      file - path
      Returns:
      free space in bytes
    • getFileRoot

      public static String getFileRoot(String path)
      Get the file system root.
      Parameters:
      file - path
      Returns:
      file system root, e.g. C:
    • formatSpace

      public static String formatSpace(Long space)
      Format space in bytes,kBytes, etc.
      Parameters:
      space -
      Returns:
      String or null if space was null