<?php

declare(strict_types=1);

namespace App\Framework\Filesystem;

/**
 * Stellt Basis-Implementierungen für Storage-Klassen bereit.
 */
trait StorageTrait
{
    /**
     * {@inheritdoc}
     */
    public function file(string $path): File
    {
        return FilesystemFactory::createFile($path, $this);
    }

    /**
     * {@inheritdoc}
     */
    public function directory(string $path): Directory
    {
        return FilesystemFactory::createDirectory($path, $this);
    }
}
