/**
  * @param string $path_
  * @param \Closure $closure_
  */
 public static function pathApplyRecursive($path_, \Closure $closure_)
 {
     Io_Path::valueOf($path_)->applyRecursive($closure_);
 }
 public function isSiblingOf(Io_Path $path_)
 {
     return $this->getParent()->m_path === $path_->getParent()->m_path;
 }
 /**
  * @see \Components\Io_Archive::extract() \Components\Io_Archive::extract()
  *
  * @return \Components\Io_Archive_Zip
  */
 public function extract(Io_Path $directory_)
 {
     if (false === $directory_->isDirectory() || false === $directory_->isWritable()) {
         throw new Io_Exception('io/archive/zip', 'Destination must be a writable directory.');
     }
     $this->archive()->extractTo((string) $directory_);
     return $this;
 }
 protected function validPath($path_)
 {
     return Io_Path::resolve($path_)->exists();
 }
 /**
  * @param \Components\Io_Path $target_
  * @param boolean $autoCreateTargetDirectory_
  * @param integer $umaskTargetDirectory_
  *
  * @return \Components\Io_File
  */
 public function moveInto(Io_Path $destination_, $autoCreateTargetDirectory_ = false, $umaskTargetDirectory_ = 0775)
 {
     return $this->move($destination_->getFile($this->m_name), $autoCreateTargetDirectory_, $umaskTargetDirectory_);
 }
 private function scanTemporaryUploadPath(Io_Path $path_, $subPath_ = '')
 {
     if (false === String::isEmpty($subPath_) && false === String::endsWith($subPath_, '/')) {
         $subPath_ .= '/';
     }
     foreach ($path_ as $entry) {
         if ($entry->isDot()) {
             continue;
         }
         if ($entry->isFile()) {
             $this->stashFile($entry->asFile(), $subPath_);
         } else {
             if ($entry->isDirectory()) {
                 $this->scanTemporaryUploadPath($entry, $subPath_ . $entry->getName());
             }
         }
     }
     $path_->delete(true);
 }