def path_to_filesystem(root, *paths):
 paths = [sanitize_path(path).strip('/') for path in paths]
 safe_path = root
 for path in paths:
  if (not path):
   continue
  for part in path.split('/'):
   if (not is_safe_filesystem_path_component(part)):
    raise UnsafePathError(part)
   safe_path = os.path.join(safe_path, part)
 return safe_path

def path_to_filesystem ( root , * paths ) : paths = [ sanitize_path ( path ) . strip ( '/' ) for path in paths ] safe_path = root for path in paths : if ( not path ) : continue for part in path . split ( '/' ) : if ( not is_safe_filesystem_path_component ( part ) ) : raise UnsafePathError ( part ) safe_path = os . path . join ( safe_path , part ) return safe_path
convert path to a local filesystem path relative to base_folder .