/// <summary> /// Dispose of this temporary raster /// </summary> /// <param name="disposing"></param> private void Dispose(bool disposing) { // Make sure we've freed up all the handles on the file UnloadDS(); // Don't clean up this file unless it's marked temporary if (!_temporary) { return; } // Don't call the destructor if we're explicitly disposing of this. if (disposing) { GC.SuppressFinalize(this); } // Make sure to refresh and check GISFileInfo.Refresh(); if (GISFileInfo.Exists) { try { Delete(); } catch (Exception e) { Debug.WriteLine(e.ToString()); } // best effort only GISFileInfo.Refresh(); } }
/// <summary> /// FileInfo does not refresh until you tell it to. Use this when you create or destroy a file /// </summary> public void RefreshFileInfo() { GISFileInfo.Refresh(); }
public bool FileExists() { GISFileInfo.Refresh(); return(GISFileInfo != null && GISFileInfo.Exists); }