MCPcopy Create free account
hub / github.com/FongMi/CatVodSpider / getList

Method getList

app/src/main/java/com/github/catvod/spider/WebDAV.java:145–156  ·  view source on GitHub ↗
(Drive drive, String path, List<String> ext)

Source from the content-addressed store, hash-verified

143 }
144
145 private List<DavResource> getList(Drive drive, String path, List<String> ext) throws IOException {
146 path = drive.getHost() + (path.startsWith(drive.getPath()) ? path : drive.getPath() + path);
147 List<DavResource> items = drive.getWebdav().list(path);
148 items.remove(0); //Remove parent
149 Iterator<DavResource> iterator = items.iterator();
150 while (iterator.hasNext()) {
151 DavResource item = iterator.next();
152 if (!item.isDirectory() && !item.getName().contains(".")) iterator.remove();
153 if (!item.isDirectory() && !ext.contains(getExt(item))) iterator.remove();
154 }
155 return items;
156 }
157
158 private List<DavResource> getSubs(List<DavResource> items) {
159 List<DavResource> subs = new ArrayList<>();

Callers 2

categoryContentMethod · 0.95
detailContentMethod · 0.95

Calls 6

getExtMethod · 0.95
getWebdavMethod · 0.80
getHostMethod · 0.45
getPathMethod · 0.45
listMethod · 0.45
getNameMethod · 0.45

Tested by

no test coverage detected