Package org.hyperic.sigar

Examples of org.hyperic.sigar.DirStat


                           file);

        if (info.getType() == FileInfo.TYPE_DIR) {
            info.enableDirStat(true);

            DirStat stats = sigar.getDirStat(file);
            System.out.println("   Files......." + stats.getFiles());
            System.out.println("   Subdirs....." + stats.getSubdirs());
            System.out.println("   Symlinks...." + stats.getSymlinks());
            System.out.println("   Chrdevs....." + stats.getChrdevs());
            System.out.println("   Blkdevs....." + stats.getBlkdevs());
            System.out.println("   Sockets....." + stats.getSockets());
            System.out.println("   Total......." + stats.getTotal());
            System.out.println("   Disk Usage.." + stats.getDiskUsage());
        }
    }
View Full Code Here


        assertGtZeroTrace("Ctime", info.getCtime());
        traceln(new Date(info.getCtime()).toString());

        if (info.getType() == FileInfo.TYPE_DIR) {
            try {
                DirStat stats = sigar.getDirStat(file);
                assertEqualsTrace("Total",
                                  new File(file).list().length,
                                  stats.getTotal());
                assertGtEqZeroTrace("Files", stats.getFiles());
                assertGtEqZeroTrace("Subdirs", stats.getSubdirs());
            } catch (SigarNotImplementedException e) {
                //XXX win32
            }
        }
        else {
View Full Code Here

        assertGtZeroTrace("Ctime", info.getCtime());
        traceln(new Date(info.getCtime()).toString());

        if (info.getType() == FileInfo.TYPE_DIR) {
            try {
                DirStat stats = sigar.getDirStat(file);
                assertEqualsTrace("Total",
                                  new File(file).list().length,
                                  stats.getTotal());
                assertGtEqZeroTrace("Files", stats.getFiles());
                assertGtEqZeroTrace("Subdirs", stats.getSubdirs());
            } catch (SigarNotImplementedException e) {
                //XXX win32
            }
        }
        else {
View Full Code Here

        assertGtZeroTrace("Ctime", info.getCtime());
        traceln(new Date(info.getCtime()).toString());

        if (info.getType() == FileInfo.TYPE_DIR) {
            try {
                DirStat stats = sigar.getDirStat(file);
                assertEqualsTrace("Total",
                                  new File(file).list().length,
                                  stats.getTotal());
                assertGtEqZeroTrace("Files", stats.getFiles());
                assertGtEqZeroTrace("Subdirs", stats.getSubdirs());
            } catch (SigarNotImplementedException e) {
                //XXX win32
            }
        }
        else {
View Full Code Here

                           file);

        if (info.getType() == FileInfo.TYPE_DIR) {
            info.enableDirStat(true);

            DirStat stats = sigar.getDirStat(file);
            System.out.println("   Files......." + stats.getFiles());
            System.out.println("   Subdirs....." + stats.getSubdirs());
            System.out.println("   Symlinks...." + stats.getSymlinks());
            System.out.println("   Chrdevs....." + stats.getChrdevs());
            System.out.println("   Blkdevs....." + stats.getBlkdevs());
            System.out.println("   Sockets....." + stats.getSockets());
            System.out.println("   Total......." + stats.getTotal());
            System.out.println("   Disk Usage.." + stats.getDiskUsage());
        }
    }
View Full Code Here

TOP

Related Classes of org.hyperic.sigar.DirStat

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.