- Move 12 markdown files from root to docs/ subdirectories - Organize documentation by category: • docs/troubleshooting/ (1 file) - Technical troubleshooting guides • docs/deployment/ (4 files) - Deployment and security documentation • docs/guides/ (3 files) - Feature-specific guides • docs/planning/ (4 files) - Planning and improvement proposals Root directory cleanup: - Reduced from 16 to 4 markdown files in root - Only essential project files remain: • CLAUDE.md (AI instructions) • README.md (Main project readme) • CLEANUP_PLAN.md (Current cleanup plan) • SRC_STRUCTURE_IMPROVEMENTS.md (Structure improvements) This improves: ✅ Documentation discoverability ✅ Logical organization by purpose ✅ Clean root directory ✅ Better maintainability
61 lines
1.2 KiB
PHP
61 lines
1.2 KiB
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace App\Framework\Filesystem;
|
|
|
|
use DateTimeImmutable;
|
|
|
|
/**
|
|
* Represents a file system change event
|
|
*/
|
|
final readonly class FileChangeEvent
|
|
{
|
|
public function __construct(
|
|
private string $path,
|
|
private FileChangeType $type,
|
|
private DateTimeImmutable $timestamp
|
|
) {
|
|
}
|
|
|
|
public static function create(string $path, FileChangeType $type): self
|
|
{
|
|
return new self($path, $type, new DateTimeImmutable());
|
|
}
|
|
|
|
public function getPath(): string
|
|
{
|
|
return $this->path;
|
|
}
|
|
|
|
public function getType(): FileChangeType
|
|
{
|
|
return $this->type;
|
|
}
|
|
|
|
public function getTimestamp(): DateTimeImmutable
|
|
{
|
|
return $this->timestamp;
|
|
}
|
|
|
|
public function isType(FileChangeType $type): bool
|
|
{
|
|
return $this->type === $type;
|
|
}
|
|
|
|
public function isModification(): bool
|
|
{
|
|
return $this->type === FileChangeType::MODIFIED;
|
|
}
|
|
|
|
public function isCreation(): bool
|
|
{
|
|
return $this->type === FileChangeType::CREATED;
|
|
}
|
|
|
|
public function isDeletion(): bool
|
|
{
|
|
return $this->type === FileChangeType::DELETED;
|
|
}
|
|
}
|