Beispiel #1
0
        public static void CutFile(string file)
        {
            FileSystemInfo fsinfo = null;

            if (File.Exists(file))
            {
                fsinfo = new FileInfo(file);
            }
            else if (Directory.Exists(file))
            {
                fsinfo = new DirectoryInfo(file);
            }

            ClipboardUtils.PutFilesOnClipboard(
                new List <FileSystemInfo> {
                fsinfo
            },
                DragDropEffects.Move);
        }
Beispiel #2
0
 public static void CutFiles(IEnumerable <string> filesAndFolders)
 {
     ClipboardUtils.PutFilesOnClipboard(
         ClipboardUtils.GetFileSystemInfoList(filesAndFolders),
         DragDropEffects.Move);
 }