delete() public method

This method will return the metadata information from the deleted file or folder, if successful.
public delete ( string $path, string $root = null ) : array
$path string Path to new folder
$root string Use this to override the default root path (sandbox/dropbox)
return array
コード例 #1
0
 public function unlink($path)
 {
     $path = $this->initPath($path);
     try {
         self::$dropbox->delete($path);
     } catch (Dropbox_Exception $e) {
         return false;
     }
     return true;
 }
コード例 #2
0
ファイル: DropboxSpec.php プロジェクト: ibou77/elgg
 /**
  * @param \Dropbox_API $dropbox
  */
 function it_does_not_delete_file($dropbox)
 {
     $dropbox->delete('filename')->willThrow(new \Dropbox_Exception_NotFound());
     $this->delete('filename')->shouldReturn(false);
 }