Added new Page::folderExists() method

This commit is contained in:
Andy Miller
2017-03-05 18:38:34 -07:00
parent 90ea2fc067
commit 4726873b57
2 changed files with 11 additions and 0 deletions

View File

@@ -5,6 +5,7 @@
* Added default setting to only allow `direct-installs` from official GPM. Can be configured in `system.yaml`
* Added a new `Utils::isValidUrl()` method
* Added optional parameter to `|markdown(false)` filter to toggle block/line processing (default|true = `block`)
* Added new `Page::folderExists()` method
1. [](#improved)
* Genericized `direct-install` so it can be called via Admin plugin
1. [](#bugfix)

View File

@@ -2560,6 +2560,16 @@ class Page
return $file && $file->exists();
}
/**
* Returns whether or not the current folder exists
*
* @return bool
*/
public function folderExists()
{
return file_exists($this->path());
}
/**
* Cleans the path.
*