Creates a directory(and all parent directories if necessary).
| 624 | |
| 625 | /// Creates a directory(and all parent directories if necessary). |
| 626 | bool HDFSFileSystem::createDirectories(const std::string& path) const |
| 627 | { |
| 628 | HDFSFSPtr fs_copy = getFS(); |
| 629 | String normalized_path = normalizePath(path); |
| 630 | int ret = hdfsCreateDirectoryEx(fs_copy.get(), normalized_path.c_str(), 493, 1); |
| 631 | if (ret == -1) |
| 632 | handleError(__PRETTY_FUNCTION__); |
| 633 | return !ret; |
| 634 | } |
| 635 | |
| 636 | HDFSFSPtr HDFSFileSystem::getFS() const |
| 637 | { |