1 /*
2  * Modification History
3  *
4  * 2003-January-23   Jason Rohrer
5  * Created.
6  *
7  *
8  * 2003-November-10   Jason Rohrer
9  * Added makeDirectory function.
10  */
11 
12 
13 
14 #include "minorGems/common.h"
15 #include "minorGems/io/file/File.h"
16 
17 
18 
19 #ifndef DIRECTORY_INCLUDED
20 #define DIRECTORY_INCLUDED
21 
22 
23 
24 /**
25  * Class of static directory functions.
26  *
27  * This class exists because most directory operations are
28  * platform-dependent, and a large body of existing code
29  * depends on a platform-independent File.h.
30  *
31  * @author Jason Rohrer.
32  */
33 class Directory {
34 
35     public:
36 
37 
38 
39         /**
40          * Removes a directory.
41          *
42          * The directory must be empty for this call to succeed.
43          *
44          * @param inFile the file representing the directory.
45          *   Must be destroyed by caller.
46          *
47          * @return true if the directory is removed successfully, or
48          *   false otherwise (for example, if the directory is not empy).
49          */
50         static char removeDirectory( File *inFile );
51 
52 
53 
54         /**
55          * Makes a directory.
56          *
57          * @param inFile the file representing the directory.
58          *   Must be destroyed by caller.
59          *
60          * @return true if the directory is removed successfully, or
61          *   false otherwise (for example, if the directory is not empy).
62          */
63         static char makeDirectory( File *inFile );
64 
65 
66 
67     };
68 
69 
70 
71 #endif
72 
73 
74