本文整理了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
暂无
代码示例来源: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();
}
内容来源于网络,如有侵权,请联系作者删除!