Skip to content

Commit

Permalink
add doc about Local adapter directory deletion feature
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolasmure committed Jun 5, 2019
1 parent c85b964 commit 8b23f73
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions doc/adapters/local.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,17 @@ use Gaufrette\Adapter\Local as LocalAdapter;
$adapter = new LocalAdapter('/var/media', true, 0750);
$filesystem = new Filesystem($adapter);
```

## Delete a directory

Directory deletion is a feature only available on the `Local` adapter. It is
not supported by the `FilesysteInterface` which aims to only deal with objects.

Following the above statement, you have to explicitely retrieve the adapter
in order to delete a directory :

```php
$filesystem->getAdapter()->delete($dirKey);
```

Note that you can't delete the root directory of the Local adapter.

0 comments on commit 8b23f73

Please sign in to comment.