Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FileCollection #4830

Merged
merged 8 commits into from
Jun 27, 2021
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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