public function containsFile(Io_File $file_) { return $this->m_path === $file_->getDirectory()->m_path; }
/** * @param \Components\Io_File $target_ * * @return \Components\Io_File */ public function move(Io_File $destination_, $autoCreateTargetDirectory_ = false, $umaskTargetDirectory_ = 0775) { if (true === $autoCreateTargetDirectory_) { $targetDirectory = $destination_->getDirectory(); if (false === $targetDirectory->exists()) { $targetDirectory->create($umaskTargetDirectory_); } } if (false === rename($this->m_pathAsString, $destination_->m_pathAsString)) { if (is_file($destination_->m_pathAsString)) { unlink($this->m_pathAsString); } else { throw new Io_Exception('io/file', sprintf('Failed to move file to given destination [source: %s, destination: %s].', $this, $destination_)); } } return $destination_; }