Lines Matching refs:directory
530 String::Utf8Value directory(args[0]);
531 if (*directory == NULL) {
535 if (chdir(*directory) != 0) {
558 static bool CheckItsADirectory(char* directory) {
560 int stat_result = stat(directory, &stat_buf);
572 // error if the directory exists already.
573 static bool mkdirp(char* directory, mode_t mask) {
574 int result = mkdir(directory, mask);
577 return CheckItsADirectory(directory);
579 char* last_slash = strrchr(directory, '/');
585 if (!mkdirp(directory, mask)) return false;
587 result = mkdir(directory, mask);
590 return CheckItsADirectory(directory);
614 String::Utf8Value directory(args[0]);
615 if (*directory == NULL) {
619 mkdirp(*directory, mask);
629 String::Utf8Value directory(args[0]);
630 if (*directory == NULL) {
634 rmdir(*directory);