public void Set(DeleteFileOptions other) { if (other != null) { m_ApiVersion = PlayerDataStorageInterface.DeletefileoptionsApiLatest; LocalUserId = other.LocalUserId; Filename = other.Filename; } }
/// <summary> /// Deletes an existing file in the cloud. If successful, the file's data will be removed from our local cache. /// </summary> /// <param name="deleteOptions">Object containing properties related to which user is deleting the file, and what file name is</param> /// <param name="clientData">Optional pointer to help clients track this request, that is returned in the completion callback</param> /// <param name="completionCallback">This function is called when the delete operation completes</param> public void DeleteFile(DeleteFileOptions deleteOptions, object clientData, OnDeleteFileCompleteCallback completionCallback) { System.IntPtr deleteOptionsAddress = new System.IntPtr(); Helper.TryMarshalSet <DeleteFileOptionsInternal, DeleteFileOptions>(ref deleteOptionsAddress, deleteOptions); var clientDataAddress = System.IntPtr.Zero; var completionCallbackInternal = new OnDeleteFileCompleteCallbackInternal(OnDeleteFileCompleteCallbackInternalImplementation); Helper.AddCallback(ref clientDataAddress, clientData, completionCallback, completionCallbackInternal); EOS_PlayerDataStorage_DeleteFile(InnerHandle, deleteOptionsAddress, clientDataAddress, completionCallbackInternal); Helper.TryMarshalDispose(ref deleteOptionsAddress); }
protected override void internal_command_proc() { abort = false; QueryPanelInfoEventArgs e = new QueryPanelInfoEventArgs(); OnQueryCurrentPanel(e); if (e.FocusedIndex == -1) { return; } if (!(e.ItemCollection is DirectoryList)) { return; } DirectoryList dl = (DirectoryList)e.ItemCollection; main_window = dl.MainWindow; int[] sel_indices = e.SelectedIndices; //we must cache selection //becouse indexes will be change while deleting List <FileInfoEx> sel_files = new List <FileInfoEx>(); if (sel_indices.Length > 0) { for (int i = 0; i < sel_indices.Length; i++) { sel_files.Add(dl[sel_indices[i]]); } } else { if (dl[e.FocusedIndex].FileName == "..") { Messages.ShowMessage(Options.GetLiteral(Options.LANG_WRONG_DESTINATION)); return; } sel_files.Add(dl[e.FocusedIndex]); } //now we have list for delete opts = Options.DeleteFileOptions; //show user dialog... DeleteFileDialog dialog = new DeleteFileDialog(); dialog.Text = CommandMenu.Text; dialog.DeleteFileOptions = opts; dialog.textBoxMask.Text = "*"; if (dialog.ShowDialog() != DialogResult.OK) { return; } opts = dialog.DeleteFileOptions; Options.DeleteFileOptions = opts; delete_mask = dialog.textBoxMask.Text; if (sel_files.Count == 1) { delete_entry(sel_files[0]); } else { foreach (FileInfoEx info in sel_files) { if (abort) { break; } delete_entry(info); } } if (main_window != null) { main_window.NotifyLongOperation(string.Empty, false); } }