| 148 | } |
| 149 | |
| 150 | int main(int argc, char* argv[]) |
| 151 | { |
| 152 | int ch; |
| 153 | bool rmdir_on = false, recursive = false, use_class = false; |
| 154 | acl::string path; |
| 155 | acl::log::stdout_open(true); |
| 156 | |
| 157 | while ((ch = getopt(argc, argv, "hd:raRC")) > 0) { |
| 158 | switch (ch) { |
| 159 | case 'h': |
| 160 | usage(argv[0]); |
| 161 | return 0; |
| 162 | case 'd': |
| 163 | path = optarg; |
| 164 | break; |
| 165 | case 'r': |
| 166 | recursive = true; |
| 167 | break; |
| 168 | case 'R': |
| 169 | rmdir_on = true; |
| 170 | break; |
| 171 | case 'C': |
| 172 | use_class = true; |
| 173 | break; |
| 174 | default: |
| 175 | break; |
| 176 | } |
| 177 | } |
| 178 | |
| 179 | if (path.empty()) { |
| 180 | usage(argv[0]); |
| 181 | return 1; |
| 182 | } |
| 183 | |
| 184 | if (!path.end_with("/")) { |
| 185 | path += "/"; |
| 186 | } |
| 187 | |
| 188 | if (use_class) { |
| 189 | rmdir_on_empty(path, recursive, rmdir_on); |
| 190 | } else { |
| 191 | rmdir_on_empty2(path, recursive, rmdir_on); |
| 192 | } |
| 193 | |
| 194 | #ifdef WIN32 |
| 195 | printf("========================================================\r\n"); |
| 196 | printf("enter any key to exit!\r\n"); |
| 197 | getchar(); |
| 198 | #endif |
| 199 | |
| 200 | return (0); |
| 201 | } |
nothing calls this directly
no test coverage detected
searching dependent graphs…