equal
deleted
inserted
replaced
5376 while (::read(0, buf, sizeof(buf)) <= 0) { ::sleep(100); } |
5376 while (::read(0, buf, sizeof(buf)) <= 0) { ::sleep(100); } |
5377 |
5377 |
5378 return buf[0] == 'y' || buf[0] == 'Y'; |
5378 return buf[0] == 'y' || buf[0] == 'Y'; |
5379 } |
5379 } |
5380 |
5380 |
5381 int os::stat(const char *path, struct stat *sbuf) { |
|
5382 char pathbuf[MAX_PATH]; |
|
5383 if (strlen(path) > MAX_PATH - 1) { |
|
5384 errno = ENAMETOOLONG; |
|
5385 return -1; |
|
5386 } |
|
5387 os::native_path(strcpy(pathbuf, path)); |
|
5388 return ::stat(pathbuf, sbuf); |
|
5389 } |
|
5390 |
|
5391 // Is a (classpath) directory empty? |
5381 // Is a (classpath) directory empty? |
5392 bool os::dir_is_empty(const char* path) { |
5382 bool os::dir_is_empty(const char* path) { |
5393 DIR *dir = NULL; |
5383 DIR *dir = NULL; |
5394 struct dirent *ptr; |
5384 struct dirent *ptr; |
5395 |
5385 |