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;