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

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

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

	// Return collection of files
	return files;		
    }