<?php
/**
 * File inventory item.
 *
 * @package LocalGuardScanner
 */

namespace LocalGuardScanner\Detection\Filesystem;

/**
 * Bounded metadata for a discovered filesystem object.
 */
final class FileInventoryItem {
	/** @var string */
	private $path;
	/** @var string */
	private $relative_path;
	/** @var array<string,mixed> */
	private $metadata;

	/**
	 * @param string              $path          Absolute path.
	 * @param string              $relative_path Relative locator.
	 * @param array<string,mixed> $metadata      lstat metadata.
	 */
	public function __construct( $path, $relative_path, array $metadata ) {
		$this->path          = $path;
		$this->relative_path = $relative_path;
		$this->metadata      = $metadata;
	}

	/** @return string */
	public function path() {
		return $this->path;
	}

	/** @return string */
	public function relative_path() {
		return $this->relative_path;
	}

	/** @return array<string,mixed> */
	public function metadata() {
		return $this->metadata;
	}
}
