Updateed DownloadConfig example to correctly delete file
This commit is contained in:
parent
2b5ade26fa
commit
4b87d3b660
|
|
@ -21,7 +21,7 @@ public class DownloadConfig extends Example {
|
||||||
private void test() throws MikrotikApiException, InterruptedException {
|
private void test() throws MikrotikApiException, InterruptedException {
|
||||||
con.execute("/export file=conf");
|
con.execute("/export file=conf");
|
||||||
List<Map<String, String>> res = con.execute("/file/print detail where name=conf.rsc");
|
List<Map<String, String>> res = con.execute("/file/print detail where name=conf.rsc");
|
||||||
con.execute("/file/remove conf.rsc");
|
con.execute("/file/remove .id=conf.rsc");
|
||||||
String text = res.get(0).get("contents");
|
String text = res.get(0).get("contents");
|
||||||
for (String line : text.split("\r")) {
|
for (String line : text.split("\r")) {
|
||||||
System.out.println(line);
|
System.out.println(line);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue