function _ensureFoldersExist() {
  _ensureFoldersExist = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee5(channelName, paths) {
    var chmodValue;
    return _regenerator["default"].wrap(function _callee5$(_context5) {
      while (1) switch (_context5.prev = _context5.next) {
        case 0:
          paths = paths || getPaths(channelName);
          _context5.next = 3;
          return ensureBaseFolderExists();
        case 3:
          _context5.next = 5;
          return mkdir(paths.channelBase)["catch"](function () {
            return null;
          });
        case 5:
          _context5.next = 7;
          return Promise.all([mkdir(paths.readers)["catch"](function () {
            return null;
          }), mkdir(paths.messages)["catch"](function () {
            return null;
          })]);
        case 7:
          // set permissions so other users can use the same channel
          chmodValue = '777';
          _context5.next = 10;
          return Promise.all([chmod(paths.channelBase, chmodValue), chmod(paths.readers, chmodValue), chmod(paths.messages, chmodValue)])["catch"](function () {
            return null;
          });
        case 10:
        case "end":
          return _context5.stop();
      }
    }, _callee5);
  }));
  return _ensureFoldersExist.apply(this, arguments);
}
removes the tmp-folder
@return {Promise<true>}