mirror of
https://github.com/getgrav/grav.git
synced 2026-07-09 04:03:28 +02:00
Added new Page::folderExists() method
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user