private static long sizeOfDirectory0(final File directory) {
        final File[] files = directory.listFiles();
        if (files == null) {  // null if security restricted
            return 0L;
        }
        long size = 0;

        for (final File file : files) {
//            try {
//                if (!isSymlink(file)) {
                    size += sizeOf0(file); // internal method
                    if (size < 0) {
                        break;
                    }
//                }
//            } catch (final IOException ioe) {
//                // Ignore exceptions caught when asking if a File is a symlink.
//            }
        }

        return size;
    }
the size of a director
@param directory the directory to check
@return the size
replugin-host-library/replugin-host-lib/src/main/java/com/qihoo360/replugin/utils/FileUtils.java