You are here

function FMDiskFileSystem::getDirs in N1ED - Visual editor as CKEditor plugin with Bootstrap support 8.2

Gets directory list.

Overrides FMDiskFileSystemInterface::getDirs

File

src/Flmngr/FlmngrServer/fs/FMDiskFileSystem.php, line 31

Class

FMDiskFileSystem
Implements file system interface. Provides an interface to access file system (local disc FS). This is the correct module to replace if you want to implement some custom file system support (i. e. network file system like Amazon S3).

Namespace

Drupal\n1ed\Flmngr\FlmngrServer\fs

Code

function getDirs() {
  $dirs = [];
  $fDir = $this->dirFiles;
  if (!file_exists($fDir) || !is_dir($fDir)) {
    throw new MessageException(FMMessage::createMessage(FMMessage::FM_ROOT_DIR_DOES_NOT_EXIST));
  }
  $this
    ->getDirs__fill($dirs, $fDir, "");
  return $dirs;
}