public void MoveItem(FileSystemMoveItemOptions options) { var item = options.Item; var destinationDirectory = options.DestinationDirectory; if (!IsFileItemExists(item)) { ThrowItemNotFoundException(item); } if (!IsFileItemExists(destinationDirectory)) { ThrowItemNotFoundException(destinationDirectory); } if (!AllowCopyOrMove(item, destinationDirectory)) { ThrowNoAccessException(); } var fileItem = GetFileItem(item); fileItem.ParentId = ParseKey(destinationDirectory.Key); fileItem.Modified = DateTime.Now; fileItem.ModifiedById = GuestPersonId; FileManagementDbContext.SaveChanges(); }
public void MoveItem(FileSystemMoveItemOptions options) { Copy(options.Item, options.DestinationDirectory, true); }