public static Collection<File> listDirectories(File path,boolean recurse)
	{
		// List of files / directories
		Vector<File> dirs = new Vector<File>();

		// Get files / directories in the directory
		File[] entries = path.listFiles();

		if(Common.notNullOrEmpty(entries))
			for (File entry : entries)
			{
				if(isDirectory(entry)){ dirs.add(entry); }
				// If the file is a directory and the recurse flag
				// is set, recurse into the directory
				if (recurse && entry.isDirectory()){dirs.addAll(listDirectories(entry, recurse));}
			}

		// Return collection of files
		return dirs;		
	}