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

Method getList

app/src/main/java/com/github/catvod/spider/Samba.java:107–121  ·  view source on GitHub ↗
(Drive drive, String path)

Source from the content-addressed store, hash-verified

105 }
106
107 private List<FileIdBothDirectoryInformation> getList(Drive drive, String path) {
108 List<FileIdBothDirectoryInformation> items = drive.getShare().list(getPath(drive.getSubPath(), path));
109 Iterator<FileIdBothDirectoryInformation> iterator = items.iterator();
110 while (iterator.hasNext()) {
111 FileIdBothDirectoryInformation item = iterator.next();
112 if (isFolder(item) && item.getFileName().startsWith(".")) iterator.remove();
113 if (isFile(item) && !Util.isMedia(item.getFileName())) iterator.remove();
114 }
115 Collections.sort(items, (o1, o2) -> {
116 if (isFolder(o1) && isFile(o2)) return -1;
117 if (isFile(o1) && isFolder(o2)) return 1;
118 return o1.getFileName().toLowerCase().compareTo(o2.getFileName().toLowerCase());
119 });
120 return items;
121 }
122
123 @Override
124 public void destroy() {

Callers 5

categoryContentMethod · 0.95
detailContentMethod · 0.95
checkCopyMethod · 0.45
homeVideoContentMethod · 0.45
categoryContentMethod · 0.45

Calls 8

getPathMethod · 0.95
isFolderMethod · 0.95
isFileMethod · 0.95
isMediaMethod · 0.95
getShareMethod · 0.80
getSubPathMethod · 0.80
listMethod · 0.45
sortMethod · 0.45

Tested by

no test coverage detected