本文整理了Java中org.neo4j.io.fs.FileUtils.relativePath()
方法的一些代码示例,展示了FileUtils.relativePath()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。FileUtils.relativePath()
方法的具体详情如下:
包路径:org.neo4j.io.fs.FileUtils
类名称:FileUtils
方法名:relativePath
[英]Given a directory and a path under it, return filename of the path relative to the directory.
[中]给定一个目录及其下的路径,返回相对于该目录的路径的文件名。
代码示例来源:origin: org.neo4j/neo4j-com
private void doWrite( StoreWriter writer, ByteBuffer temporaryBuffer, File file, int recordSize,
ReadableByteChannel fileChannel, long fileSize, String storeCopyIdentifier, boolean isLogFile ) throws IOException
{
monitor.startStreamingStoreFile( file, storeCopyIdentifier );
String path = isLogFile ? file.getName() : relativePath( storeDirectory, file );
writer.write( path, fileChannel, temporaryBuffer, fileSize > 0, recordSize );
monitor.finishStreamingStoreFile( file, storeCopyIdentifier );
}
}
代码示例来源:origin: org.neo4j/neo4j-causal-clustering
private StoreResource toStoreResource( StoreFileMetadata storeFileMetadata ) throws IOException
{
File storeDir = neoStoreDataSource.getStoreDir();
File file = storeFileMetadata.file();
String relativePath = relativePath( storeDir, file );
return new StoreResource( file, relativePath, storeFileMetadata.recordSize(), pageCache, fileSystemAbstraction );
}
代码示例来源:origin: org.neo4j/neo4j-causal-clustering
@Override
public boolean next() throws IOException
{
if ( !files.hasNext() )
{
resource = null;
return false;
}
StoreFileMetadata md = files.next();
resource = new StoreResource( md.file(), relativePath( storeDir, md.file() ), md.recordSize(), pageCache, fs );
return true;
}
代码示例来源:origin: org.neo4j/neo4j-causal-clustering
new StoreResource( storeFileMetadata.file(), relativePath( storeDir, storeFileMetadata.file() ), storeFileMetadata.recordSize(),
pageCache, fs ) );
内容来源于网络,如有侵权,请联系作者删除!