Added File::move and File::copy methods.
This commit is contained in:
parent
b41bba45d7
commit
3c7a1270a7
|
@ -68,6 +68,30 @@ public static function delete($path)
|
||||||
if (static::exists($path)) @unlink($path);
|
if (static::exists($path)) @unlink($path);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Move a file to a new location.
|
||||||
|
*
|
||||||
|
* @param string $path
|
||||||
|
* @param string $target
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public static function move($path, $target)
|
||||||
|
{
|
||||||
|
return rename($path, $target);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Copy a file to a new location.
|
||||||
|
*
|
||||||
|
* @param string $path
|
||||||
|
* @param string $target
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public static function copy($path, $target)
|
||||||
|
{
|
||||||
|
return copy($path, $target);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Extract the file extension from a file path.
|
* Extract the file extension from a file path.
|
||||||
*
|
*
|
||||||
|
|
Loading…
Reference in New Issue