本文整理了Java中org.apache.nifi.util.file.FileUtils.getContainerUsableSpace()
方法的一些代码示例,展示了FileUtils.getContainerUsableSpace()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。FileUtils.getContainerUsableSpace()
方法的具体详情如下:
包路径:org.apache.nifi.util.file.FileUtils
类名称:FileUtils
方法名:getContainerUsableSpace
[英]Returns the free capacity for a given path
[中]返回给定路径的可用容量
代码示例来源:origin: apache/nifi
@Override
public long getContainerUsableSpace(String containerName) throws IOException {
final Path path = containers.get(containerName);
if (path == null) {
throw new IllegalArgumentException("No container exists with name " + containerName);
}
return FileUtils.getContainerUsableSpace(path);
}
代码示例来源:origin: apache/nifi
@Override
public long getContainerUsableSpace(String containerName) throws IOException {
Map<String, File> map = config.getStorageDirectories();
File container = map.get(containerName);
if(container != null) {
return FileUtils.getContainerUsableSpace(container.toPath());
} else {
throw new IllegalArgumentException("There is no defined container with name " + containerName);
}
}
}
代码示例来源:origin: apache/nifi
@Override
public long getContainerUsableSpace(String containerName) throws IOException {
Map<String, File> map = configuration.getStorageDirectories();
File container = map.get(containerName);
if(container != null) {
return FileUtils.getContainerUsableSpace(container.toPath());
} else {
throw new IllegalArgumentException("There is no defined container with name " + containerName);
}
}
代码示例来源:origin: apache/nifi-minifi
@Override
public long getContainerUsableSpace(String containerName) throws IOException {
Map<String, File> map = configuration.getStorageDirectories();
File container = map.get(containerName);
if(container != null) {
return FileUtils.getContainerUsableSpace(container.toPath());
} else {
throw new IllegalArgumentException("There is no defined container with name " + containerName);
}
}
内容来源于网络,如有侵权,请联系作者删除!