def refresh_subdir(subdir):
	'''Control function for one subdirectory.

- Initiate refresh/creation.
- Copy the remaining folder content.'''
	pages_struct=process_dir(subdir)
	
	# (info-print)
	print("Processing: ", subdir)
	
	if pages_struct != []:
		make_regular_pages(pages_struct, subdir)
		copy_remaining_content(subdir)
	else:
		make_listing_page(subdir)
		copy_listing_content(subdir)
def refresh_subdirs_recursive(refresh_dir):
	'''Control function acting recursively from given directory on.

- Initiate refresh/creation.
- Copy the remaining folder content.'''
	subdirs=get_dirs(refresh_dir)
	
	# process dirs
	for subdir in subdirs:
		print('Processing: ', subdir)
		# (call process_dir)
		pages_struct=process_dir(subdir)
		
		# if no index page is found a directory listing will be created
		if pages_struct != []:
			make_regular_pages(pages_struct, subdir)
			copy_remaining_content(subdir)
		else:
			make_listing_page(subdir)
			copy_listing_content(subdir)