Exemplo n.º 1
0
 /**
  * 
  * @return boolean
  */
 public function remove_folder()
 {
     $folder = $this->folder;
     if (!empty($this->folder) and is_dir(PUBLICPATH . $this->folder)) {
         FileSystem::factory(PUBLICPATH . $this->folder)->delete();
         return TRUE;
     }
     return !is_dir(PUBLICPATH . $this->folder);
 }
Exemplo n.º 2
0
 /**
  * 
  * @return FileSystem
  */
 public function getParent()
 {
     $path = $this->getPath();
     $parent_path = !empty($path) ? substr($path, 0, strrpos($path, DIRECTORY_SEPARATOR)) : '';
     return FileSystem::factory($parent_path);
 }
Exemplo n.º 3
0
 /**
  * 
  * @param string $name
  * @return boolean
  */
 public function rename($name)
 {
     if (rename($this->_real_path, $this->_path . DIRECTORY_SEPARATOR . $name)) {
         return FileSystem::factory($this->_path . DIRECTORY_SEPARATOR . $name);
     }
     return FALSE;
 }
Exemplo n.º 4
0
 /**
  * 
  * @return FileSystem
  */
 public function getParent()
 {
     return FileSystem::factory($this->getPathInfo());
 }