jordanlytle / SmbAbstraction

Implements the System.IO.Abstractions interfaces for interacting with the filesystem, and adds support for interacting with UNC or SMB paths
MIT License
6 stars 8 forks source link

File.Move Issue #24

Closed wgv-mrunnels closed 4 years ago

wgv-mrunnels commented 4 years ago

File.Move appears to just be doing a copy leaving the original file in place. Does not match expected behavior of System.IO.File.Move.

internal void Move(string sourceFileName, string destFileName, ISMBCredential sourceCredential, ISMBCredential destinationCredential)
{
    using (Stream sourceStream = OpenRead(sourceFileName, sourceCredential))
    {
          using (Stream destStream = OpenWrite(destFileName, destinationCredential))
          {
               sourceStream.CopyTo(destStream, Convert.ToInt32(_maxBufferSize));
          }
    }
}
Jo0 commented 4 years ago

Got changes and tests staged. Will be publishing a new package soon.

Jo0 commented 4 years ago

Just tested published package version 1.1.6

Move now remove file specified in sourceFileName