| 136 | } |
| 137 | |
| 138 | bool FuzzApp::QueuePath(const StringImpl& path) |
| 139 | { |
| 140 | if (DirectoryExists(path)) |
| 141 | { |
| 142 | for (auto& fileEntry : FileEnumerator(path, FileEnumerator::Flags_Files)) |
| 143 | { |
| 144 | String filePath = fileEntry.GetFilePath(); |
| 145 | |
| 146 | String fileName; |
| 147 | fileName = GetFileName(filePath); |
| 148 | |
| 149 | String ext; |
| 150 | ext = GetFileExtension(filePath); |
| 151 | |
| 152 | if ((ext.Equals(".bf", StringImpl::CompareKind_OrdinalIgnoreCase)) || |
| 153 | (ext.Equals(".cs", StringImpl::CompareKind_OrdinalIgnoreCase))) |
| 154 | { |
| 155 | int len; |
| 156 | const char* data = LoadTextData(filePath, &len); |
| 157 | if (data != NULL) |
| 158 | { |
| 159 | bool success = QueueFile(data, len); |
| 160 | delete[] data; |
| 161 | |
| 162 | if (!success) |
| 163 | return false; |
| 164 | } |
| 165 | } |
| 166 | } |
| 167 | |
| 168 | for (auto& fileEntry : FileEnumerator(path, FileEnumerator::Flags_Directories)) |
| 169 | { |
| 170 | String childPath = fileEntry.GetFilePath(); |
| 171 | String dirName; |
| 172 | dirName = GetFileName(childPath); |
| 173 | |
| 174 | if (dirName == "build") |
| 175 | continue; |
| 176 | |
| 177 | if (!QueuePath(childPath)) |
| 178 | return false; |
| 179 | } |
| 180 | |
| 181 | return true; |
| 182 | } |
| 183 | |
| 184 | return false; |
| 185 | } |
| 186 | |
| 187 | bool FuzzApp::CopyFile(const StringImpl& srcPath, const StringImpl& destPath) |
| 188 | { |
nothing calls this directly
no test coverage detected