示例#1
0
/*
* Извежда метаданните на всички файлове в параметрите.
*/
void CommandPrompt::getFileMetadata(string parameters){
	/*
	* Ако няма параметри извежда метаданните на текущата директория.
	*/
	if (parameters.empty()) {
		currentDir->printMeta();
		return;
	}

	/*
	* Извлича адресите от параметрите и за всеки намира директорията или файла 
	*/
	queue<string> dirPaths = getPaths(parameters);
	TextFile* file;
	while (!dirPaths.empty()) {
		file = this->determinePathAndGetFile(dirPaths.front());
		if (file != NULL)
			file->printMeta();
		dirPaths.pop();
	}
}