public function checkFolderWrite(FolderEvent $event)
 {
     $folder = $event->getFolder();
     if (!$this->adapter->isFolderWritable($folder)) {
         $this->dispatchDenyEvent($folder);
         throw $this->createAccessDeniedException($folder, 'write');
     }
 }
 /**
  * @test
  */
 public function eventShouldInitializeCorrectly()
 {
     $folder = $this->getMockedFolder();
     $event = new FolderEvent($folder);
     $folder2 = $event->getFolder();
     $this->assertSame($folder, $folder2);
     $folder3 = $event->getIdentifiable();
     $this->assertSame($folder, $folder3);
 }