Skip to content

Commit edacdb2

Browse files
committed
Added single file add
1 parent 1843eac commit edacdb2

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/org/ipfs/IPFS.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,10 @@ public IPFS(String host, int port, String version) {
3434
this.version = version;
3535
}
3636

37+
public MerkleNode add(NamedStreamable file) throws IOException {
38+
return add(Arrays.<NamedStreamable>asList(file)).get(0);
39+
}
40+
3741
public List<MerkleNode> add(List<NamedStreamable> files) throws IOException {
3842
Multipart m = new Multipart("http://" + host + ":" + port + version+"add?stream-channels=true", "UTF-8");
3943
for (NamedStreamable f : files)

0 commit comments

Comments
 (0)