本文整理了Java中org.apache.cassandra.io.util.FileUtils.getFileStore()
方法的一些代码示例,展示了FileUtils.getFileStore()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。FileUtils.getFileStore()
方法的具体详情如下:
包路径:org.apache.cassandra.io.util.FileUtils
类名称:FileUtils
方法名:getFileStore
[英]Returns the FileStore representing the file store where a file is located. This FileStore handles large file system by returning Long.MAX_VALUEfrom FileStore#getTotalSpace(), FileStore#getUnallocatedSpace() and FileStore#getUsableSpace()it the value is bigger than Long.MAX_VALUE. See JDK-8162520 for more information.
[中]返回表示文件所在的文件存储的文件存储。此文件存储通过返回Long来处理大型文件系统。如果该值大于Long,则来自FileStore#getTotalSpace()、FileStore#getUnallocatedSpace()和FileStore#getUsableSpace()的最大值。最大值。有关详细信息,请参见JDK-8162520。
代码示例来源:origin: org.apache.cassandra/cassandra-all
private static FileStore guessFileStore(String dir) throws IOException
{
Path path = Paths.get(dir);
while (true)
{
try
{
return FileUtils.getFileStore(path);
}
catch (IOException e)
{
if (e instanceof NoSuchFileException)
path = path.getParent();
else
throw e;
}
}
}
代码示例来源:origin: jsevellec/cassandra-unit
private static FileStore guessFileStore(String dir) throws IOException
{
Path path = Paths.get(dir);
while (true)
{
try
{
return FileUtils.getFileStore(path);
}
catch (IOException e)
{
if (e instanceof NoSuchFileException)
path = path.getParent();
else
throw e;
}
}
}
代码示例来源:origin: com.strapdata.cassandra/cassandra-all
private static FileStore guessFileStore(String dir) throws IOException
{
Path path = Paths.get(dir);
while (true)
{
try
{
return FileUtils.getFileStore(path);
}
catch (IOException e)
{
if (e instanceof NoSuchFileException)
path = path.getParent();
else
throw e;
}
}
}
内容来源于网络,如有侵权,请联系作者删除!