private function deleteFolder(Path $p) { $folderPath = $this->baseDir . $p->getPath(); if (false === @rmdir($folderPath)) { throw new DocumentStorageException('unable to delete folder'); } }
public function testChars() { $p = new Path('/Fran%C3%A7ois/foo/'); $this->assertEquals('/François/foo/', $p->getPath()); }
public function deleteNode(Path $p) { $stmt = $this->db->prepare(sprintf('DELETE FROM %s WHERE path = :path', $this->prefix . 'md')); $stmt->bindValue(':path', $p->getPath(), PDO::PARAM_STR); $stmt->execute(); if (1 !== $stmt->rowCount()) { throw new MetadataStorageException('unable to delete node'); } }