| 91 | } |
| 92 | |
| 93 | String File::dirName(const String& fileName) { |
| 94 | String ret; |
| 95 | |
| 96 | std::string file = fileName.utf8(); |
| 97 | char* fn = new char[file.size() + 1]; |
| 98 | std::copy(file.begin(), file.end(), fn); |
| 99 | fn[file.size()] = 0; |
| 100 | ret = String(::dirname(fn)); |
| 101 | delete[] fn; |
| 102 | |
| 103 | return ret; |
| 104 | } |
| 105 | |
| 106 | String File::relativeTo(String const& relativeTo, String const& path) { |
| 107 | if (path.beginsWith("/")) |