code: def get_path(dest, file, cwd = None):
  	
  	if callable(dest):
  		return dest(file)
  
  	if not cwd:
  		cwd = file.cwd
  	if not os.path.isabs(dest):
  		dest = os.path.join(cwd, dest)
  
  	relative = os.path.relpath(file.path, file.base)
  	return os.path.join(dest, relative)
docs: Get the writing path of a file.