mirror of
https://github.com/SociallyDev/Spaces-API.git
synced 2025-08-14 02:27:23 -07:00
Moved files now retain the current Object
This commit is contained in:
parent
a2bb0f4129
commit
d7f0b36dc1
3 changed files with 6 additions and 5 deletions
|
@ -233,10 +233,12 @@ class File
|
|||
*/
|
||||
public function move(string $newFilename): File
|
||||
{
|
||||
$newFile = $this->copy($newFilename);
|
||||
$this->copy($newFilename);
|
||||
$this->delete();
|
||||
$this->_filename = $newFilename;
|
||||
$this->fetchFileInfo();
|
||||
|
||||
return $newFile;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue