com.android.tools.build.bundletool.model.ZipPath.getParent()方法的使用及代码示例

x33g5p2x  于2022-02-05 转载在 其他  
字(1.4k)|赞(0)|评价(0)|浏览(107)

本文整理了Java中com.android.tools.build.bundletool.model.ZipPath.getParent()方法的一些代码示例,展示了ZipPath.getParent()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ZipPath.getParent()方法的具体详情如下:
包路径:com.android.tools.build.bundletool.model.ZipPath
类名称:ZipPath
方法名:getParent

ZipPath.getParent介绍

暂无

代码示例

代码示例来源:origin: google/bundletool

@Override
@CheckReturnValue
public ZipPath resolveSibling(Path path) {
 checkNotNull(path, "Path cannot be null.");
 checkState(!getNames().isEmpty(), "Root has not sibling.");
 return getParent().resolve(path);
}

代码示例来源:origin: google/bundletool

/**
 * Returns all {@link ModuleEntry} living directly under a given relative module directory path.
 *
 * <p>Entries inside subdirectories relative to the given directory are not returned.
 */
public Stream<ModuleEntry> findEntriesInsideDirectory(String directory) {
 return getEntries()
   .stream()
   .filter(entry -> entry.getPath().getParent().equals(ZipPath.create(directory)));
}

代码示例来源:origin: google/bundletool

@Test
public void testGetParent() {
 ZipPath path = ZipPath.create("foo/bar");
 assertThat((Object) path.getParent()).isEqualTo(ZipPath.create("foo"));
 assertThat((Object) path.getParent().getParent()).isEqualTo(ZipPath.create(""));
}

代码示例来源:origin: google/bundletool

@Test
public void testGetParentFromRoot_returnsNull() {
 ZipPath root = ZipPath.create("");
 assertThat((Object) root.getParent()).isNull();
}

相关文章