private CopyMoveResult CopyToMoveToCore(string destinationPath, CopyOptions?copyOptions, MoveOptions?moveOptions, CopyMoveProgressRoutine progressHandler, object userProgressData, out string longFullPath, PathFormat pathFormat)
        {
            string destinationPathLp = Path.GetExtendedLengthPathCore(null, destinationPath, pathFormat, GetFullPathOptions.TrimEnd | GetFullPathOptions.RemoveTrailingDirectorySeparator | GetFullPathOptions.FullCheck);

            longFullPath = destinationPathLp;

            // Returns false when CopyMoveProgressResult is PROGRESS_CANCEL or PROGRESS_STOP.
            return(Directory.CopyMoveCore(Transaction, LongFullName, destinationPathLp, copyOptions, moveOptions, progressHandler, userProgressData, PathFormat.LongFullPath));
        }
Esempio n. 2
0
        private CopyMoveResult CopyToMoveToCore(string destinationPath, CopyOptions?copyOptions, MoveOptions?moveOptions, CopyMoveProgressRoutine progressHandler, object userProgressData, out string longFullPath, PathFormat pathFormat)
        {
            // Allow null value for destinationPath when flag MoveOptions.DelayUntilReboot is specified.
            var delayUntilReboot = null == destinationPath && null != moveOptions && ((MoveOptions)moveOptions & MoveOptions.DelayUntilReboot) != 0;

            var destinationPathLp = longFullPath = delayUntilReboot
            ? null
            : Path.GetExtendedLengthPathCore(Transaction, destinationPath, pathFormat, GetFullPathOptions.TrimEnd | GetFullPathOptions.RemoveTrailingDirectorySeparator | GetFullPathOptions.FullCheck);


            return(Directory.CopyMoveCore(Transaction, LongFullName, destinationPathLp, copyOptions, moveOptions, progressHandler, userProgressData, PathFormat.LongFullPath));
        }
Esempio n. 3
0
        private CopyMoveResult CopyToMoveToCore(string destinationPath, bool preserveDates, CopyOptions?copyOptions, MoveOptions?moveOptions, CopyMoveProgressRoutine progressHandler, object userProgressData, out string longFullPath, PathFormat pathFormat)
        {
            longFullPath = Path.GetExtendedLengthPathCore(Transaction, destinationPath, pathFormat, GetFullPathOptions.TrimEnd | GetFullPathOptions.RemoveTrailingDirectorySeparator | GetFullPathOptions.FullCheck);

            return(Directory.CopyMoveCore(Transaction, LongFullName, longFullPath, preserveDates, copyOptions, moveOptions, progressHandler, userProgressData, null, PathFormat.LongFullPath));
        }