| 391 | } |
| 392 | |
| 393 | ssize_t HDFSFileSystem::write(const int fd, const void *buf, size_t count) |
| 394 | { |
| 395 | HDFSFSPtr fs_copy = getFS(); |
| 396 | auto file = getHDFSFileByFd(fd); |
| 397 | ssize_t ret = hdfsWrite(fs_copy.get(), file, buf, count); |
| 398 | if (ret == -1) |
| 399 | { |
| 400 | handleError(__PRETTY_FUNCTION__); |
| 401 | } |
| 402 | return ret; |
| 403 | } |
| 404 | |
| 405 | bool HDFSFileSystem::copyTo(const std::string& path, |
| 406 | const std::string& rpath) |