Exemplo n.º 1
0
 public void CopyFile(string source, string target, bool overwrite)
 {
     if (_sharpCifsFileSystem.IsEnabledForPath(source))
     {
         _sharpCifsFileSystem.CopyFile(source, target, overwrite);
         return;
     }
     File.Copy(source, target, overwrite);
 }
Exemplo n.º 2
0
        public void CopyFile(string source, string target, bool overwrite)
        {
            var enableSharpCifsForSource = _sharpCifsFileSystem.IsEnabledForPath(source);

            if (enableSharpCifsForSource != _sharpCifsFileSystem.IsEnabledForPath(target))
            {
                CopyFileUsingStreams(source, target, overwrite);
                return;
            }

            if (enableSharpCifsForSource)
            {
                _sharpCifsFileSystem.CopyFile(source, target, overwrite);
                return;
            }
            File.Copy(source, target, overwrite);
        }