You are here

public function ImceFM::checkFile in IMCE 8

Same name and namespace in other branches
  1. 8.2 src/ImceFM.php \Drupal\imce\ImceFM::checkFile()

Checks if the user provided file path is accessible.

Returns the file object with the path.

File

src/ImceFM.php, line 281

Class

ImceFM
Imce File Manager.

Namespace

Drupal\imce

Code

public function checkFile($path) {
  $item = $this
    ->checkItem($path);
  if ($item && $item->type === 'file') {
    return $item;
  }
}