/// <summary> /// Cleans up the temp files used by the Validator. /// </summary> /// <returns>True if all files were deleted, false otherwise.</returns> public bool DeleteTempFiles() { if (null == this.tempFiles) { return(true); // no work to do } else { bool deleted = Common.DeleteTempFiles(this.tempFiles.BasePath, this); if (deleted) { this.tempFiles = null; // temp files have been deleted, no need to remember this now } return(deleted); } }
/// <summary> /// Cleans up the temp files used by the Binder. /// </summary> /// <returns>True if all files were deleted, false otherwise.</returns> public virtual bool DeleteTempFiles() { if (null == this.tempFiles) { return(true); // no work to do } else { bool deleted = Common.DeleteTempFiles(this.TempFilesLocation, this.core); if (deleted) { ((IDisposable)this.tempFiles).Dispose(); this.tempFiles = null; // temp files have been deleted, no need to remember this now } return(deleted); } }
/// <summary> /// Cleans up the temp files used by the Inscriber. /// </summary> /// <returns>True if all files were deleted, false otherwise.</returns> public bool DeleteTempFiles() { #if REDO_IN_NETCORE if (null == this.tempFiles) { return(true); // no work to do } else { bool deleted = Common.DeleteTempFiles(this.TempFilesLocation, this); if (deleted) { ((IDisposable)this.tempFiles).Dispose(); this.tempFiles = null; // temp files have been deleted, no need to remember this now } return(deleted); } #endif return(true); }
/// <summary> /// Delete a directory with retries and best-effort cleanup. /// </summary> /// <param name="path">The directory to delete.</param> /// <param name="messageHandler">The message handler.</param> /// <returns>True if all files were deleted, false otherwise.</returns> public static bool DeleteDirectory(string path, IMessageHandler messageHandler) { return(Common.DeleteTempFiles(path, messageHandler)); }
/// <summary> /// Cleans up the temp files used by the Binder. /// </summary> /// <returns>True if all files were deleted, false otherwise.</returns> private bool DeleteTempFiles() { bool deleted = Common.DeleteTempFiles(this.TempFilesLocation, this.core); return(deleted); }