|
File.Move(fromPath, toPath); |
public override bool Rename(string fromPath, string toPath, StreamRenameOptions options, StreamContext context)
{
try
{
File.Move(fromPath, toPath);
return true;
}
...
}
This breaks PHP compatibility because File.Move() cannot move directories.
In PHP, rename() works for both files and directories and does not require distinguishing between them.
.NET requires different APIs:
File.Move() → files only
Directory.Move() → directories only
peachpie/src/Peachpie.Library/Streams/StreamWrapper.cs
Line 1100 in 25ea7e0
This breaks PHP compatibility because File.Move() cannot move directories.
In PHP, rename() works for both files and directories and does not require distinguishing between them.
.NET requires different APIs:
File.Move() → files only
Directory.Move() → directories only