Upload binary to remote runtime temp folder. @param data The binary in local to upload. @param target The path in remote, cannot be null.
(byte[] data, String target)
| 182 | * @param target The path in remote, cannot be null. |
| 183 | */ |
| 184 | public void upload(byte[] data, String target) { |
| 185 | if (target == null) { |
| 186 | throw new IllegalArgumentException("Please specify the upload target"); |
| 187 | } |
| 188 | final String funcName = "upload"; |
| 189 | Function remoteFunc = remoteFuncs.get(funcName); |
| 190 | if (remoteFunc == null) { |
| 191 | remoteFunc = getFunction("tvm.rpc.server.upload"); |
| 192 | remoteFuncs.put(funcName, remoteFunc); |
| 193 | } |
| 194 | remoteFunc.pushArg(target).pushArg(data).invoke(); |
| 195 | } |
| 196 | |
| 197 | /** |
| 198 | * Upload file to remote runtime temp folder. |
nothing calls this directly
no test coverage detected