(self, options: str)
| 299 | @brief See base class for details. |
| 300 | """ |
| 301 | def _Base__mkdir(self, options: str): |
| 302 | if len(options) == 0: |
| 303 | raise CommandException("Specify a path/folder name.") |
| 304 | out = self.__eval( |
| 305 | f"try{{" |
| 306 | f"if(fs.existsSync('{options}')){{" |
| 307 | f"r.setHeader('{self.header}'," |
| 308 | f"'Already exists.');" |
| 309 | f"}}else{{" |
| 310 | f"fs.mkdirSync('{options}'," |
| 311 | f"{{recursive:true}});" |
| 312 | f"r.setHeader('{self.header}', 'Done.');" |
| 313 | f"}}" |
| 314 | f"}}catch(e){{" |
| 315 | f"r.setHeader('{self.header}','Error.');" |
| 316 | f"}}" |
| 317 | f"r.end();") |
| 318 | print(out) |
nothing calls this directly
no test coverage detected