本文整理了Java中org.apache.commons.io.FileUtils.sizeOfBig0()
方法的一些代码示例,展示了FileUtils.sizeOfBig0()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。FileUtils.sizeOfBig0()
方法的具体详情如下:
包路径:org.apache.commons.io.FileUtils
类名称: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;
}
内容来源于网络,如有侵权,请联系作者删除!