| 161 | } |
| 162 | |
| 163 | bool File::isDirectory(String const& path) { |
| 164 | struct stat st_buf; |
| 165 | int status = stat(path.utf8Ptr(), &st_buf); |
| 166 | if (status != 0) |
| 167 | return false; |
| 168 | |
| 169 | return S_ISDIR(st_buf.st_mode); |
| 170 | } |
| 171 | |
| 172 | void File::remove(String const& filename) { |
| 173 | if (::remove(filename.utf8Ptr()) < 0) |