extractPossibleDirectories method
Extracts possible directories from the name argument into a single string
foundPaths
- each directory found prepending the filename
Implementation
String extractPossibleDirectories(
final bool verbose, final List<String> foundPaths) {
// Build the directory path
String directory = EMPTY_STRING;
for (int i = 0; i < foundPaths.length; i++) {
// Exclude the last one because that is the filename
if (i != foundPaths.length - 1) {
directory += foundPaths[i] + '/';
}
}
if (directory == EMPTY_STRING) {
VerboseLogger.logNoDirectoriesFound(verbose);
} else {
VerboseLogger.logExtractedDirectories(verbose, directory);
}
return directory;
}