From bb970e5ca187bcf4d34820084fb69bf54aae4fa7 Mon Sep 17 00:00:00 2001 From: Doug MacEachern Date: Sat, 13 Oct 2007 23:12:54 +0000 Subject: [PATCH] add DiskUsage --- bindings/java/src/org/hyperic/sigar/Sigar.java | 13 +++++++++++++ bindings/java/src/org/hyperic/sigar/SigarProxy.java | 3 +++ 2 files changed, 16 insertions(+) diff --git a/bindings/java/src/org/hyperic/sigar/Sigar.java b/bindings/java/src/org/hyperic/sigar/Sigar.java index 936a41f2..b347941b 100644 --- a/bindings/java/src/org/hyperic/sigar/Sigar.java +++ b/bindings/java/src/org/hyperic/sigar/Sigar.java @@ -654,6 +654,19 @@ public class Sigar implements SigarProxy { return FileSystemUsage.fetch(this, name); } + /** + * Get disk usage. + * @param name Name of disk + * @exception SigarException on failure. + */ + public DiskUsage getDiskUsage(String name) + throws SigarException { + if (name == null) { + throw new SigarException("name cannot be null"); + } + return DiskUsage.fetch(this, name); + } + /** * Get file system usage of a mounted directory. * This method checks that the given directory is mounted. diff --git a/bindings/java/src/org/hyperic/sigar/SigarProxy.java b/bindings/java/src/org/hyperic/sigar/SigarProxy.java index e2ec93ea..5f4ea007 100644 --- a/bindings/java/src/org/hyperic/sigar/SigarProxy.java +++ b/bindings/java/src/org/hyperic/sigar/SigarProxy.java @@ -117,6 +117,9 @@ public interface SigarProxy { public FileSystemUsage getFileSystemUsage(String name) throws SigarException; + public DiskUsage getDiskUsage(String name) + throws SigarException; + public FileInfo getFileInfo(String name) throws SigarException; public FileInfo getLinkInfo(String name) throws SigarException;