|
|
@ -45,6 +45,7 @@ object WebDavHelp { |
|
|
|
val url = getWebDavUrl() |
|
|
|
val url = getWebDavUrl() |
|
|
|
val names = arrayListOf<String>() |
|
|
|
val names = arrayListOf<String>() |
|
|
|
if (!url.isNullOrBlank() && initWebDav()) { |
|
|
|
if (!url.isNullOrBlank() && initWebDav()) { |
|
|
|
|
|
|
|
try { |
|
|
|
var files = WebDav(url + "legado/").listFiles() |
|
|
|
var files = WebDav(url + "legado/").listFiles() |
|
|
|
files = files.reversed() |
|
|
|
files = files.reversed() |
|
|
|
for (index: Int in 0 until min(10, files.size)) { |
|
|
|
for (index: Int in 0 until min(10, files.size)) { |
|
|
@ -52,6 +53,9 @@ object WebDavHelp { |
|
|
|
names.add(it) |
|
|
|
names.add(it) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} catch (e: Exception) { |
|
|
|
|
|
|
|
return names |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
return names |
|
|
|
return names |
|
|
|
} |
|
|
|
} |
|
|
|