public override void MoveFile(string sourceFilePath, IFileSystem targetFileSystem, string targetFilePath)
 {
     if (targetFileSystem.IsLocal)
     {
         LongPathFile.Move(sourceFilePath, targetFilePath);
     }
     else
     {
         File.Move(GetFullPath(sourceFilePath), targetFileSystem.GetFullPath(targetFilePath));
     }
 }
Exemplo n.º 2
0
        public void Move(string originalFilePath, string newFilePath)
        {
            AssertAllowed(originalFilePath);
            AssertAllowed(newFilePath);
#if !MONO
            var mTx = CurrentTransaction();
            if (mTx.HasValue)
            {
                ((IFileAdapter)mTx.Value).Move(originalFilePath, newFilePath);
                return;
            }
#endif

            LongPathFile.Move(originalFilePath, newFilePath);
        }
Exemplo n.º 3
0
        void IDirectoryAdapter.Move(string originalPath, string newPath, bool overwrite)
        {
            AssertAllowed(originalPath);
            AssertAllowed(newPath);

#if !MONO
            var mTx = CurrentTransaction();
            if (mTx.HasValue)
            {
                ((IDirectoryAdapter)mTx.Value).Move(originalPath, newPath);
                return;
            }
#endif

            LongPathFile.Move(originalPath, newPath);
        }
Exemplo n.º 4
0
 public void MoveTo(string destFileName)
 {
     LongPathFile.Move(this.NormalizedPath, destFileName);
 }
Exemplo n.º 5
0
 public override FileSystemItem MoveTo(FileSystemItem item)
 {
     LongPathFile.Move(Path, item.Path);
     return(item);
 }