Returns the timestamp of this file,
or of its specified revision.

@param   mixed  $revision  The index or timestamp of the revision (optional)
@return  mixed             The timestamp of this file (string),
or null if revision not found
350293
public function getTimestamp($revision = null)
	{
		// Without revision, use current info
		if (!isset($revision)) {
			return $this->info['timestamp'];
		}

		// Obtain the properties of the revision
		if (($info = $this->getRevision($revision)) === null) {
			return null;
		}

		return $info['timestamp'];
	}
512454
public function getMime($revision = null)
	{
		// Without revision, use current info
		if (!isset($revision)) {
			return $this->info['mime'];
		}

		// Obtain the properties of the revision
		if (($info = $this->getRevision($revision)) === null) {
			return null;
		}

		return $info['mime'];
	}
206087
public function getUrl($revision = null)
	{
		// Without revision, use current info
		if (!isset($revision)) {
			return $this->info['url'];
		}

		// Obtain the properties of the revision
		if (($info = $this->getRevision($revision)) === null) {
			return null;
		}

		return $info['url'];
	}
745511
public function getComment($revision = null)
	{
		// Without revision, use current info
		if (!isset($revision)) {
			return $this->info['comment'];
		}

		// Obtain the properties of the revision
		if (($info = $this->getRevision($revision)) === null) {
			return null;
		}

		return $info['comment'];
	}
458630
private function checkContent(Revision $revision)
    {
        $content = $revision->getContent();

        if (null === $content || !($content instanceof AbstractClassContent)) {
            $this->_em->remove($revision);
            throw new ClassContentException('Orphan revision, deleted', ClassContentException::REVISION_ORPHAN);
        }

        if ($revision->getRevision() != $content->getRevision()) {
            throw new ClassContentException('Content is out of date', ClassContentException::REVISION_OUTOFDATE);
        }

        return $content;
    }
176296
private function _getObject($id, $revision = null)
    {
        if ($revision === null) {
            $select = Statement::get(
                'GET_CURRENT_OBJECT',
                [
                    '@collection' => $this->_name,
                    '@id' => $this->_connector->quote($id)
                ]
            );
            $record = $this->_connector->query($select)->fetch();
            if ($record) {
                return json_decode($record['obj']);
            }
        }
        return null;
    }
169867
public function loadSubcontents(Revision $revision)
    {
        $content = $revision->getContent();
        if ($content instanceof ContentSet) {
            while ($subcontent = $revision->next()) {
                if (!($subcontent instanceof AbstractClassContent)) {
                    continue;
                }

                if ($this->_em->contains($subcontent)) {
                    continue;
                }

                $subcontent = $this->_em->find(get_class($subcontent), $subcontent->getUid());
            }
        } else {
            foreach ($revision->getData() as $key => $value) {
                if (is_array($value)) {
                    foreach ($value as &$val) {
                        if ($val instanceof AbstractClassContent) {
                            if (null !== $entity = $this->_em->find(get_class($val), $val->getUid())) {
                                $val = $entity;
                            }
                        }
                    }

                    unset($val);
                } elseif ($value instanceof AbstractClassContent) {
                    if (null !== $entity = $this->_em->find(get_class($value), $value->getUid())) {
                        $value = $entity;
                    }
                }

                $revision->$key = $value;
            }
        }

        return $revision;
    }
1159691
protected function getFilenameForRevision(string $revision): string
    {
        $ext = pathinfo($this->filename, PATHINFO_EXTENSION);

        return substr_replace($this->filename, '-'.$revision, -strlen($ext) - 1, 0);
    }
1048107
public function getChangedFilesSince(string $revision) : array
    {
        $cmd    = (new ChangedFiles($this->repo->getRoot()))->byRevision($revision);
        $result = $this->runner->run($cmd);

        return $result->getBufferedOutput();
    }
1163557
public static function timestamp($time = null): int
    {
        if ($time instanceof \DateTime) {
            return $time->format('U');
        }

        $time = time();

        if ($time !== null) {
            $time = is_numeric($time) ? (int) $time : strtotime($time);
        }

        return $time;
    }
1251800
protected function getLastEditedForVersion($version)
    {
        Deprecation::notice('5.0', 'Use getLastEditedAndStageForVersion instead');
        $result = $this->getLastEditedAndStageForVersion($version);
        if ($result) {
            return reset($result);
        }
        return null;
    }
821472
public function setRevision($revision)
    {
        if (!in_array((int) $revision, self::REVISION)) {
            throw new InvalidArgumentException(sprintf(
                'The value "%s" is not a recognized revision number. Allowed revisions are: %s',
                $revision,
                implode(', ', self::REVISION)
            ));
        }
        $this->revision = (int) $revision;

        return $this;
    }
106853
protected function _timestampFile($file, $time)
    {
        if (!$time) {
            return $file;
        }
        $pos = strrpos($file, '.');
        $name = substr($file, 0, $pos);
        $ext = substr($file, $pos);
        return $name . '.v' . $time . $ext;
    }
1248490
public function getUserId($revision = null)
	{
		// Without revision, use current info
		if (!isset($revision)) {
			return (int)$this->info['userid'];
		}

		// Obtain the properties of the revision
		if (($info = $this->getRevision($revision)) === null) {
			return -1;
		}

		return (int)$info['userid'];
	}
1191742
public Revision get(final int revisionIndex)
	{
		if (this.storage.containsKey(revisionIndex)) {

			ChronoStorageBlock block = this.storage.get(revisionIndex);
			return block.getRev();
		}
		return null;
	}
545561
public function getDescriptionUrl($revision = null)
	{
		// Without revision, use current info
		if (!isset($revision)) {
			return $this->info['descriptionurl'];
		}

		// Obtain the properties of the revision
		if (($info = $this->getRevision($revision)) === null) {
			return null;
		}

		return $info['descriptionurl'];
	}
160145
public function getFilemtimeCurrent($file)
    {
        if(is_readable($file) === false)
            return false;

        $time = filemtime($file);

        return $time ? $time : false;
    }