# code-snippets/3.9.1/php/flat-files/interfaces/interface-file-system.php

Code Snippets, version 3.9.1. 15 lines.

- Page: https://pluginprobe.com/plugins/code-snippets/3.9.1/code/php/flat-files/interfaces/interface-file-system.php
- Raw: https://pluginprobe.com/plugins/code-snippets/3.9.1/raw/php/flat-files/interfaces/interface-file-system.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.9.1/code/php/flat-files/interfaces/interface-file-system.php#L10-L20`.

```php
<?php

namespace Code_Snippets;

interface File_System_Interface {
	public function put_contents( string $path, string $contents, $chmod );
	public function exists( string $path ): bool;
	public function delete( $file, $recursive = false, $type = false ): bool;
	public function is_dir( string $path ): bool;
	public function mkdir( string $path, $chmod );
	public function rmdir( string $path, bool $recursive = false ): bool;
	public function chmod( string $path, $chmod ): bool;
	public function is_writable( string $path ): bool;
}

```
