Example #1
0
        public void SkipCurrentFile(bool fastMove)
        {
            if (!File.Exists(CurrentFile.DestinyPath))
            {
                CurrentFile.CopyState            = CopyState.Processing;
                DiscoverdList.SizeOfFilesToCopy -= CurrentFile.Size;

                if (fastMove)
                {
                    Alphaleonis.Win32.Filesystem.File.Move(CurrentFile.FullName, CurrentFile.DestinyPath);
                }
                else
                {
                    FileCopier.CopyFile(CurrentFile);
                }


                AffterFileCopyAction.Invoke(CurrentFile);
            }
            else
            {
                FileCopier.TotalBytesTransferred += CurrentFile.Size;

                FileCollisionAction = AllwaysAsk;
            }
        }
Example #2
0
        public void AllwaysAsk(bool fastMove)
        {
            //Copy the current file.
            if (File.Exists(CurrentFile.DestinyPath))
            {
                if (FileCollisionAction == CancelCollision)
                {
                    return;
                }

                FileCollisionAction = FileExist(this, CurrentFile);

                FileCollisionAction.Invoke(fastMove);
            }
            else
            {
                CurrentFile.CopyState            = CopyState.Processing;
                DiscoverdList.SizeOfFilesToCopy -= CurrentFile.Size;

                if (fastMove)
                {
                    Alphaleonis.Win32.Filesystem.File.Move(CurrentFile.FullName, CurrentFile.DestinyPath);
                }
                else
                {
                    FileCopier.CopyFile(CurrentFile);
                }

                AffterFileCopyAction.Invoke(CurrentFile);
            }
        }
Example #3
0
        public void OverwriteAll(bool fastMove)
        {
            //Copy the current file.
            CurrentFile.CopyState            = CopyState.Processing;
            DiscoverdList.SizeOfFilesToCopy -= CurrentFile.Size;

            if (fastMove)
            {
                if (Alphaleonis.Win32.Filesystem.File.Exists(CurrentFile.DestinyPath))
                {
                    Alphaleonis.Win32.Filesystem.File.Delete(CurrentFile.DestinyPath);
                }
                Alphaleonis.Win32.Filesystem.File.Move(CurrentFile.FullName, CurrentFile.DestinyPath);
            }
            else
            {
                FileCopier.CopyFile(CurrentFile);
                AffterFileCopyAction.Invoke(CurrentFile);
            }
        }