/** * @return the default block size for this file, 0 for directories, immutable */ public long getBlockSizeBytes() { return mInfo.getBlockSizeBytes(); }
.setFileId(fileInfo.getFileId()).setName(fileInfo.getName()).setPath(fileInfo.getPath()) .setUfsPath(fileInfo.getUfsPath()).setLength(fileInfo.getLength()) .setBlockSizeBytes(fileInfo.getBlockSizeBytes()) .setCreationTimeMs(fileInfo.getCreationTimeMs()).setCompleted(fileInfo.isCompleted()) .setFolder(fileInfo.isFolder()).setPinned(fileInfo.isPinned())
/** * Tests the {@link MutableInodeDirectory#generateClientFileInfo(String)} method. */ @Test public void generateClientFileInfo() { MutableInodeDirectory inodeDirectory = createInodeDirectory(); String path = "/test/path"; FileInfo info = inodeDirectory.generateClientFileInfo(path); Assert.assertEquals(inodeDirectory.getId(), info.getFileId()); Assert.assertEquals(inodeDirectory.getName(), info.getName()); Assert.assertEquals(path, info.getPath()); Assert.assertEquals("", info.getUfsPath()); Assert.assertEquals(0, info.getLength()); Assert.assertEquals(0, info.getBlockSizeBytes()); Assert.assertEquals(inodeDirectory.getCreationTimeMs(), info.getCreationTimeMs()); Assert.assertTrue(info.isCompleted()); Assert.assertTrue(info.isFolder()); Assert.assertEquals(inodeDirectory.isPinned(), info.isPinned()); Assert.assertFalse(info.isCacheable()); Assert.assertNotNull(info.getBlockIds()); Assert.assertEquals(inodeDirectory.getLastModificationTimeMs(), info.getLastModificationTimeMs()); } }
/** * @return the default block size for this file, 0 for directories, immutable */ public long getBlockSizeBytes() { return mInfo.getBlockSizeBytes(); }
Assert.assertEquals(a.getBlockSizeBytes(), b.getBlockSizeBytes()); Assert.assertEquals(a.getCreationTimeMs(), b.getCreationTimeMs()); Assert.assertEquals(a.getFileBlockInfos(), b.getFileBlockInfos());
/** * @return the default block size for this file, 0 for directories, immutable */ public long getBlockSizeBytes() { return mInfo.getBlockSizeBytes(); }
Assert.assertEquals(uriStatus.getBlockIds(), fileInfo.getBlockIds()); Assert.assertEquals(uriStatus.getBlockSizeBytes(), fileInfo.getBlockSizeBytes()); Assert.assertEquals(uriStatus.getCreationTimeMs(), fileInfo.getCreationTimeMs());