Example #1
0
 public void NewItem(string folderName, string name, FileAttributes attrs)
 {
     ThrowIfDisposed();
     using (ComReleaser <IShellItem> folderItem = CreateShellItem(folderName))
     {
         _fileOperation.NewItem(folderItem.Item, attrs, name, string.Empty, _callbackSink);
     }
 }
Example #2
0
 public void RenameItem(string source, string newName)
 {
     ThrowIfDisposed();
     using (ComReleaser <IShellItem> sourceItem = CreateShellItem(source))
     {
         _fileOperation.RenameItem(sourceItem.Item, newName, null);
     }
 }
Example #3
0
 public void DeleteItem(string source)
 {
     ThrowIfDisposed();
     using (ComReleaser <IShellItem> sourceItem = CreateShellItem(source))
     {
         _fileOperation.DeleteItem(sourceItem.Item, null);
     }
 }
Example #4
0
 public void MoveItem(string source, string destination, string newName)
 {
     ThrowIfDisposed();
     using (ComReleaser <IShellItem> sourceItem = CreateShellItem(source))
         using (ComReleaser <IShellItem> destinationItem = CreateShellItem(destination))
         {
             _fileOperation.MoveItem(sourceItem.Item, destinationItem.Item, newName, null);
         }
 }