mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2024-01-19 02:48:24 +00:00
Updated SeaweedFS Java Client (markdown)
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);
|
||||
|
||||
```
|
Loading…
Reference in a new issue