public bool RemoveFile(string filePath) { NSError error; var result = GDFileSystem.RemoveItemAtPath(filePath, out error); if (!result && error != null) { Console.WriteLine("RemoveFile error domain={0} code={1:d} userinfo={2}", error.Domain, (long)error.Code, error.UserInfo.Description); } return(result); }
public override void DidFinishSendingTo(string application, NSObject[] attachments, NSObject parameters, string requestID) { Console.WriteLine("Send Finished"); NSError error = null; if (!AttachmentsValid(attachments)) { return; } var filePath = (NSString)attachments.ElementAtOrDefault(0); GDFileSystem.RemoveItemAtPath(filePath, out error); if (error != null) { Console.WriteLine("Cant delete old file - {0}", error.LocalizedDescription); } }