Skip to content

Commit

Permalink
Add new methods exist() and delete() to Files class
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeckerson committed Dec 15, 2020
1 parent 0eec207 commit 8394c2a
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions src/Files.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,25 @@ public function setFormattedName(string $filename, ?FormatterInterface $formatte
return $name->getFormattedName();
}

/**
* @param string $filenamePath
* @return bool
* @throws FilesystemException
*/
public function exist(string $filenamePath): bool
{
return $this->fileSystemAdapter->fileExists($filenamePath);
}

/**
* @param string $filenamePath
* @throws FilesystemException
*/
public function delete(string $filenamePath)
{
$this->fileSystemAdapter->delete($filenamePath);
}

/**
* @param string $filenamePath
* @param string $contents
Expand Down

0 comments on commit 8394c2a

Please sign in to comment.