org.apache.commons.io.FileUtils.sizeOfBig0()方法的使用及代码示例

x33g5p2x  于2022-01-18 转载在 其他  
字(1.8k)|赞(0)|评价(0)|浏览(157)

本文整理了Java中org.apache.commons.io.FileUtils.sizeOfBig0()方法的一些代码示例,展示了FileUtils.sizeOfBig0()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。FileUtils.sizeOfBig0()方法的具体详情如下:
包路径:org.apache.commons.io.FileUtils
类名称:FileUtils
方法名:sizeOfBig0

FileUtils.sizeOfBig0介绍

[英]Returns the sid of a file
[中]返回文件的sid

代码示例

代码示例来源:origin: commons-io/commons-io

/**
 * Finds the size of a directory
 *
 * @param directory The directory
 * @return the size
 */
private static BigInteger sizeOfDirectoryBig0(final File directory) {
  final File[] files = directory.listFiles();
  if (files == null) {  // null if security restricted
    return BigInteger.ZERO;
  }
  BigInteger size = BigInteger.ZERO;
  for (final File file : files) {
    try {
      if (!isSymlink(file)) {
        size = size.add(sizeOfBig0(file));
      }
    } catch (final IOException ioe) {
      // Ignore exceptions caught when asking if a File is a symlink.
    }
  }
  return size;
}

代码示例来源:origin: io.github.stephenc.docker/docker-client-shaded

/**
 * Finds the size of a directory
 *
 * @param directory The directory
 * @return the size
 */
private static BigInteger sizeOfDirectoryBig0(final File directory) {
  final File[] files = directory.listFiles();
  if (files == null) {  // null if security restricted
    return BigInteger.ZERO;
  }
  BigInteger size = BigInteger.ZERO;
  for (final File file : files) {
    try {
      if (!isSymlink(file)) {
        size = size.add(sizeOfBig0(file));
      }
    } catch (final IOException ioe) {
      // Ignore exceptions caught when asking if a File is a symlink.
    }
  }
  return size;
}

代码示例来源:origin: com.impetus.fabric/fabric-jdbc-driver-shaded

/**
 * Finds the size of a directory
 *
 * @param directory The directory
 * @return the size
 */
private static BigInteger sizeOfDirectoryBig0(final File directory) {
  final File[] files = directory.listFiles();
  if (files == null) {  // null if security restricted
    return BigInteger.ZERO;
  }
  BigInteger size = BigInteger.ZERO;
  for (final File file : files) {
    try {
      if (!isSymlink(file)) {
        size = size.add(sizeOfBig0(file));
      }
    } catch (final IOException ioe) {
      // Ignore exceptions caught when asking if a File is a symlink.
    }
  }
  return size;
}

相关文章

FileUtils类方法