Updated SeaweedFS Java Client (markdown)

Jérôme BAROTIN 2021-04-22 23:03:16 +02:00
parent 1d82a1e555
commit ddd06d6f4d

@ -66,3 +66,24 @@ The following is one implementation. It just watch the folder "/buckets" and all
}
}
```
## Standard file manipulation
You can also use this API for standard file manipulation: directory listing, file touch, folder creation, file deletion, and recursive folder deletion.
```
FilerClient filerClient = new FilerClient("localhost", 18888);
List<FilerProto.Entry> entries = filerClient.listEntries("/");
for (FilerProto.Entry entry : entries) {
System.out.println(entry.toString());
}
filerClient.mkdirs("/new_folder", 0755);
filerClient.touch("/new_folder/new_empty_file", 0755);
filerClient.touch("/new_folder/new_empty_file2", 0755);
filerClient.rm("/new_folder/new_empty_file", false, true);
filerClient.rm("/new_folder", true, true);
```