Search in sources :

Example 1 with SegmentLevel

use of com.enonic.xp.blob.SegmentLevel in project xp by enonic.

the class FileBlobStore method getBlobFile.

private Path getBlobFile(final Segment segment, final BlobKey key) {
    final String id = key.toString();
    Path file = this.baseDir;
    for (SegmentLevel level : segment.getLevels()) {
        file = file.resolve(level.getValue());
    }
    return file.resolve(id.substring(0, 2)).resolve(id.substring(2, 4)).resolve(id.substring(4, 6)).resolve(id);
}
Also used : Path(java.nio.file.Path) SegmentLevel(com.enonic.xp.blob.SegmentLevel)

Aggregations

SegmentLevel (com.enonic.xp.blob.SegmentLevel)1 Path (java.nio.file.Path)1