ForceDelete() public static method

Forces deletion of the given path.
This method is recursive if the given path is a directory. This method will clear read only/system attributes if required to delete the path.
public static ForceDelete ( string p_strPath ) : void
p_strPath string The path to delete.
return void
Example #1
0
 /// <summary>
 /// Ends a read-only transaction.
 /// </summary>
 /// <remarks>
 /// This takes the archive out of read-only mode, and releases any used resources.
 /// </remarks>
 public void EndReadOnlyTransaction()
 {
     if (m_szeReadOnlyExtractor != null)
     {
         m_szeReadOnlyExtractor.Dispose();
     }
     m_szeReadOnlyExtractor = null;
     if (!String.IsNullOrEmpty(m_strReadOnlyTempDirectory))
     {
         FileUtil.ForceDelete(m_strReadOnlyTempDirectory);
     }
     m_strReadOnlyTempDirectory = null;
 }