getDirectory() public method

Return directory
public getDirectory ( ) : string
return string
Exemplo n.º 1
0
 /**
  * Remove directories
  *
  * @return void
  */
 protected function removeDirectories()
 {
     $dir = $this->object->getPath() . $this->object->getDirectory();
     if (is_dir($dir)) {
         $data = glob($dir . '/*');
         foreach ($data as $file) {
             unlink($file);
         }
         $tmpDir = $dir;
         while ($tmpDir != GC_MEDIA_PATH . '/files') {
             rmdir($tmpDir);
             $tmpDir = realpath(dirname($tmpDir));
         }
     }
 }
Exemplo n.º 2
0
 /**
  * Remove directories
  *
  * @return mixed
  */
 protected function removeDirectories()
 {
     $file = new File();
     $file->load($this->property, $this->document);
     $dir = $file->getPath() . $file->getDirectory();
     if (is_dir($dir)) {
         $data = glob($dir . '/*');
         foreach ($data as $file) {
             unlink($file);
         }
         $tmpDir = $dir;
         while ($tmpDir != GC_MEDIA_PATH . '/files') {
             rmdir($tmpDir);
             $tmpDir = realpath(dirname($tmpDir));
         }
     }
 }