1 26 27 package org.objectweb.openccm.generator.common.lib; 28 29 31 38 39 public class FileManager 40 { 41 47 53 56 public FileManager() 57 { 58 } 59 60 66 67 73 79 public static void 80 mkdir(java.io.File dir) 81 throws GenerationException 82 { 83 if (dir.exists()) 84 { 85 if (!dir.isDirectory()) 86 { 87 String msg = new String (dir + " is not a directory!"); 88 throw new GenerationException(msg); 89 } 90 } 91 else 92 { 93 dir.mkdirs(); 94 } 95 } 96 97 105 public static java.io.File 106 mkdir(String dir_name) 107 throws GenerationException 108 { 109 java.io.File dir = new java.io.File (dir_name); 110 mkdir(dir); 111 return dir; 112 } 113 } 114 | Popular Tags |