Skip to content

Commit

Permalink
Merge pull request #4830 from MGatner/file-collection
Browse files Browse the repository at this point in the history
  • Loading branch information
MGatner authored Jun 27, 2021
2 parents f6cc4de + 9936bb4 commit bb23bc9
Show file tree
Hide file tree
Showing 11 changed files with 1,150 additions and 772 deletions.
20 changes: 20 additions & 0 deletions system/Files/Exceptions/FileException.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,24 @@ public static function forUnableToMove(string $from = null, string $to = null, s
{
return new static(lang('Files.cannotMove', [$from, $to, $error]));
}

/**
* Throws when an item is expected to be a directory but is not or is missing.
*
* @param string $caller The method causing the exception
*/
public static function forExpectedDirectory(string $caller)
{
return new static(lang('Files.expectedDirectory', [$caller]));
}

/**
* Throws when an item is expected to be a file but is not or is missing.
*
* @param string $caller The method causing the exception
*/
public static function forExpectedFile(string $caller)
{
return new static(lang('Files.expectedFile', [$caller]));
}
}
Loading

0 comments on commit bb23bc9

Please sign in to comment.