You can pass State::DELETED to retrieve only deleted
and State::DELETED | State::SAVED to retrieve deleted + saved

@param  int          $flags
@return Find $this
963997
public function setFlags($flags)
    {
        if ($flags !== null) {
            if (! in_array($flags, [State::SAVED, State::DELETED, State::DELETED | State::SAVED], true)) {
                $message = 'Flags were %s, but need to be State::SAVED, State::DELETED or State::DELETED | State::SAVED';
                throw new InvalidArgumentException(sprintf($message, $flags));
            }

            $this->flags = $flags;
        }

        return $this;
    }
905866
public function clearFlags() {
		$remove = [];
		$classPrefix = 'oo-ui-flaggedElement-';

		foreach ( $this->flags as $flag ) {
			$remove[] = $classPrefix . $flag;
		}

		$this->flagged->removeClasses( $remove );
		$this->flags = [];

		return $this;
	}
1285016
public function chmod($mode, $flags = NULL) {
    $ret = chmod((string) $this,$mode);
    
    if ($ret === FALSE)
      throw new Exception('chmod für '.$this.' auf '.$mode.' nicht möglich');
      

    if ($flags & self::RECURSIVE) {
      foreach ($this->getContents() as $item) {
        if (is_object($item) && ($item instanceof File || $item instanceof Dir)) {
          $item->chmod($mode, $flags);
        }
      }
    }
    
    return $this;
  }
1117311
public function unsetFlag($flag) {
        $this->client->openFolder($this->folder_path);

        $flag = "\\".trim(is_array($flag) ? implode(" \\", $flag) : $flag);
        $status = imap_clearflag_full($this->client->getConnection(), $this->getUid(), $flag, SE_UID);
        $this->parseFlags();

        return $status;
    }
977550
public function addFlags($flags) {
		foreach ($flags as $flag => $settings) {
			if (is_numeric($flag)) {
				$this->_warn('No flag character given');
				continue;
			}

			$this->addFlag($flag, $settings);
		}

		return $this;
	}
168792
public function getFlag($flag) {
		if ($flag instanceOf Argument) {
			$obj  = $flag;
			$flag = $flag->value;
		}

		if (isset($this->_flags[$flag])) {
			return $this->_flags[$flag];
		}

		foreach ($this->_flags as $master => $settings) {
			if (in_array($flag, (array)$settings['aliases'])) {
				if (isset($obj)) {
					$obj->key = $master;
				}

				$cache[$flag] =& $settings;
				return $settings;
			}
		}
	}
145541
public static function convertToDelegateFlags($flags = null)
    {
        if (null === $flags) {
            return AMQP_NOPARAM;
        }

        $converted = 0;

        foreach (self::$flagMap as $from => $to) {
            if ($flags & $from) {
                $converted |= $to;
            }
        }

        return $converted;
    }
332687
public function getData($flag = FormInterface::VALUES_NORMALIZED)
    {
        $data = parent::getData($flag);
        if (false === $this->isNew()) {
            foreach ($this->getOriginalFields() as $field) {
                $key = 'original_' . $field;
                if (array_key_exists($key, $data)) {
                    unset($data[$key]);
                }
            }
        }
        return parent::getData($flag);
    }
288471
public function get($key, $flags = 0)
    {
        if (!isset($this->config[$key])) {
            return null;
        }
        switch ($key) {
            case 'env-file':
                $val = rtrim($this->process($this->config[$key], $flags), '/\\');
                return ($flags & self::RELATIVE_PATHS == 1) ? $val : $this->realpath($val);
            default:
                return $this->process($this->config[$key], $flags);
        }
    }
127091
public function debug($flag)
    {
        $this->debug = (in_array($flag, [true, false])) ? $flag : false;

        return $this;
    }
467708
public function getFlag($flag)
    {
        return isset($this->_parts['flags'][$flag]) ? $this->_parts['flags'][$flag] : null;
    }
1218642
public function suppressNotFoundWarnings($flag = null)
    {
        if (null === $flag) {
            return $this->_suppressNotFoundWarnings;
        }
        $this->_suppressNotFoundWarnings = (bool) $flag;
        return $this;
    }
858844
public function rsort($flags = SORT_REGULAR)
    {
        $this->_modified = true;
        return rsort($this->_storage, $flags);
    }
125194
public function withFlag($flag)
    {
        $flagValue = (is_string($flag)) ? $this->flagsFromText($flag) : $flag;

        if ($flagValue) {
            $this->getDbCriteria()->mergeWith(array(
                'condition' => $this->getTableAlias() . '.' . $this->flagsField . '&' . $flagValue . '<>0', //:flag<>0',
            ));
        }
        return $this;
    }
1339743
public function unsetFlag($key)
    {
        if ($this->hasFlag($key))
            $this->flags = array_except($this->flags, $key);

        return $this;
    }
1176521
public function andIsNotDeleted()
    {
        return $this->andWhere($this->getAlias().'._state < '.$this->expr()->literal(Page::STATE_DELETED));
    }
984560
public function setClosed($flag = true) {
		$this->_closed    = (bool) $flag;
		$this->_tagCached = null;
		
		return $this;
	}