Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updating API doc to reflect directory operations #1097

Merged
merged 1 commit into from
Dec 8, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions docs/usage/filesystem-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,32 +125,32 @@ param | description | type

---

## Check if a file exists
## Check if a file or directory exists

```php
$exists = $filesystem->has($path);
```

param | description | type
------------- | --------------------------------------------- | -----------
`$path` | location of a file | `string`
`$exists` | whether the file exists | `bool`
`$path` | location of a file/directory | `string`
`$exists` | whether it exists | `bool`

> This only has consistent behaviour for files, not directories. Directories
> are less important in Flysystem, they're created implicitly and often ignored because
> not every adapter (filesystem type) supports directories.

---

## Delete Files
## Delete Files or Directories

```php
$response = $filesystem->delete($path);
```

param | description | type
------------- | --------------------------------------------- | -----------
`$path` | location of a file | `string`
`$path` | location of a file/directory | `string`
`$response` | success boolean | `bool`

---
Expand All @@ -168,29 +168,29 @@ param | description | type

---

## Rename Files
## Rename Files or Directories

```php
$response = $filesystem->rename($from, $to);
```

param | description | type
------------- | --------------------------------------------- | -----------
`$from` | location of a file | `string`
`$from` | location of a file/directory | `string`
`$to` | new location | `string`
`$response` | success boolean | `bool`

---

## Copy Files
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should add a note here that this is not consistent behaviour across adapters (for local it works, for AWS it doesn't for example.

## Copy Files or Directories

```php
$response = $filesystem->copy($from, $to);
```

param | description | type
------------- | --------------------------------------------- | -----------
`$from` | location of a file | `string`
`$from` | location of a file/directory | `string`
`$to` | new location | `string`
`$response` | success boolean | `bool`

Expand Down