# code-snippets/3.10.0/vendor/typisttech/imposter/src/FilesystemInterface.php

Code Snippets, version 3.10.0. 62 lines.

- Page: https://pluginprobe.com/plugins/code-snippets/3.10.0/code/vendor/typisttech/imposter/src/FilesystemInterface.php
- Raw: https://pluginprobe.com/plugins/code-snippets/3.10.0/raw/vendor/typisttech/imposter/src/FilesystemInterface.php
- Modified: 2025-10-16T19:08:06+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/code-snippets/3.10.0/code/vendor/typisttech/imposter/src/FilesystemInterface.php#L10-L20`.

```php
<?php

declare(strict_types=1);

namespace TypistTech\Imposter;

interface FilesystemInterface
{
    /**
     * @param string $path
     *
     * @return \SplFileInfo[]
     */
    public function allFiles(string $path): array;

    /**
     * Extract the parent directory from a file path.
     *
     * @param  string $path
     *
     * @return string
     */
    public function dirname(string $path): string;

    /**
     * Get the contents of a file.
     *
     * @param  string $path
     *
     * @return string
     */
    public function get(string $path): string;

    /**
     * Determine if the given path is a file.
     *
     * @param  string $path
     *
     * @return bool
     */
    public function isFile(string $path): bool;

    /**
     * Determine if the given path is a directory.
     *
     * @param  string $path
     *
     * @return bool
     */
    public function isDir(string $path);

    /**
     * Write the contents of a file.
     *
     * @param  string $path
     * @param  string $contents
     *
     * @return mixed
     */
    public function put(string $path, string $contents);
}

```
