Arkade_S3_Model_Cms_Wysiwyg_Images_Storage::getDirsCollection PHP Method

getDirsCollection() public method

public getDirsCollection ( $path )
    public function getDirsCollection($path)
    {
        if ($this->getS3Helper()->checkS3Usage()) {
            /** @var Arkade_S3_Model_Core_File_Storage_S3 $storageModel */
            $storageModel = $this->getS3Helper()->getStorageDatabaseModel();
            $subdirectories = $storageModel->getSubdirectories($path);
            foreach ($subdirectories as $directory) {
                $fullPath = rtrim($path, '/') . '/' . $directory['name'];
                if (!file_exists($fullPath)) {
                    mkdir($fullPath, 0777, true);
                }
            }
        }
        return parent::getDirsCollection($path);
    }