| 73 | *****************************************************************************/ |
| 74 | |
| 75 | bool FileUtil::createDirectories(const String& path) |
| 76 | { |
| 77 | bool status = true; |
| 78 | uint8_t idx = 0U; |
| 79 | String currentPath; |
| 80 | |
| 81 | while ((true == status) && (path.length() > idx)) |
| 82 | { |
| 83 | if ('/' == path[idx]) |
| 84 | { |
| 85 | if (0U < currentPath.length()) |
| 86 | { |
| 87 | if (false == FILESYSTEM.exists(currentPath)) |
| 88 | { |
| 89 | status = FILESYSTEM.mkdir(currentPath); |
| 90 | } |
| 91 | } |
| 92 | } |
| 93 | |
| 94 | currentPath += path[idx]; |
| 95 | |
| 96 | ++idx; |
| 97 | } |
| 98 | |
| 99 | return status; |
| 100 | } |
| 101 | |
| 102 | String FileUtil::getFileName(const String& filePath) |
| 103 | { |