]> git.mxchange.org Git - simgear.git/blobdiff - simgear/misc/sg_dir.hxx
Compile under MSVC 9
[simgear.git] / simgear / misc / sg_dir.hxx
index 7befbc8cd99158b04e2aea2cad5457feafb67a05..109a0d4b0d846b1a51732683d2aec1f6882cfbf5 100644 (file)
@@ -43,7 +43,15 @@ namespace simgear
   {
   public:
     Dir();
-      
+    ~Dir();
+    
+    /**
+     * when this directory object is destroyed, remove the corresponding
+     * diretory (and its contents) from the disk. Often used with temporary
+     * directories to ensure they are cleaned up.
+     */
+    void setRemoveOnDestroy();
+    
     static Dir current();
     
     /**
@@ -93,6 +101,7 @@ namespace simgear
     Dir parent() const;
   private:
     mutable SGPath _path;
+    bool _removeOnDestroy;
   };
 } // of namespace simgear