Allowed passing validation flag to Space::file()

This commit is contained in:
David Wakelin 2022-11-11 09:55:47 +00:00
parent 3a32727c28
commit c52d22a70e
4 changed files with 194 additions and 235 deletions

View file

@ -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);
}
/**