whole_func_string: function (path, options) {
      if (!this.connected) {
        throw new Error("not connected (path: " + path + ")");
      }
  
      //check if file has changed and return 412
      var savedRev = this._revCache.get(path);
      if (options && options.ifMatch && savedRev && (options.ifMatch !== savedRev)) {
        return Promise.resolve({ statusCode: 412, revision: savedRev });
      }
  
      if (options && options.ifMatch) {
        return this._getMetadata(path).then((metadata) => {
          if (options && options.ifMatch && metadata && (metadata.rev !== options.ifMatch)) {
            return Promise.resolve({
              statusCode: 412,
              revision: metadata.rev
            });
          }
  
          return this._deleteSimple(path);
        });
      }
  
      return this._deleteSimple(path);
    }
func_code_string: function (path, options) {
      if (!this.connected) {
        throw new Error("not connected (path: " + path + ")");
      }
  
      //check if file has changed and return 412
      var savedRev = this._revCache.get(path);
      if (options && options.ifMatch && savedRev && (options.ifMatch !== savedRev)) {
        return Promise.resolve({ statusCode: 412, revision: savedRev });
      }
  
      if (options && options.ifMatch) {
        return this._getMetadata(path).then((metadata) => {
          if (options && options.ifMatch && metadata && (metadata.rev !== options.ifMatch)) {
            return Promise.resolve({
              statusCode: 412,
              revision: metadata.rev
            });
          }
  
          return this._deleteSimple(path);
        });
      }
  
      return this._deleteSimple(path);
    }
func_documentation_string: Checks for the path in ``_revCache`` and decides based on that if file
  has changed.
  
  Compatible with ``WireClient.delete``
  
  Calls ``Dropbox.share`` afterwards to fill ``_itemRefs``.
  
  @param {string} path - path of the folder to delete, with leading slash
  @param {Object} options
  
  @protected