mirror of
https://github.com/SociallyDev/Spaces-API.git
synced 2025-07-14 17:13:01 -07:00
Allowed passing validation flag to Space::file()
This commit is contained in:
parent
3a32727c28
commit
c52d22a70e
4 changed files with 194 additions and 235 deletions
|
@ -325,13 +325,14 @@ class Space
|
|||
* Get an instance of \SpacesAPI\File for a given filename
|
||||
*
|
||||
* @param string $filename
|
||||
* @package bool $validate
|
||||
*
|
||||
* @return \SpacesAPI\File
|
||||
* @throws \SpacesAPI\Exceptions\FileDoesntExistException Thrown if the file doesn't exist
|
||||
*/
|
||||
public function file(string $filename): File
|
||||
public function file(string $filename, bool $validate = true): File
|
||||
{
|
||||
return new File($this, $filename);
|
||||
return new File($this, $filename, [], $validate);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue