def get_pack_file_abs_path(pack_ref, file_path):
 pack_base_path = get_pack_base_path(pack_name=pack_ref)
 path_components = []
 path_components.append(pack_base_path)
 normalized_file_path = os.path.normpath(('/' + file_path)).lstrip('/')
 if (normalized_file_path != file_path):
  raise ValueError(('Invalid file path: %s' % file_path))
 path_components.append(normalized_file_path)
 result = os.path.join(*path_components)
 assert (normalized_file_path in result)
 common_prefix = os.path.commonprefix([pack_base_path, result])
 if (common_prefix != pack_base_path):
  raise ValueError(('Invalid file_path: %s' % file_path))
 return result

def get_pack_file_abs_path ( pack_ref , file_path ) : pack_base_path = get_pack_base_path ( pack_name = pack_ref ) path_components = [ ] path_components . append ( pack_base_path ) normalized_file_path = os . path . normpath ( ( '/' + file_path ) ) . lstrip ( '/' ) if ( normalized_file_path != file_path ) : raise ValueError ( ( 'Invalid file path: %s' % file_path ) ) path_components . append ( normalized_file_path ) result = os . path . join ( * path_components ) assert ( normalized_file_path in result ) common_prefix = os . path . commonprefix ( [ pack_base_path , result ] ) if ( common_prefix != pack_base_path ) : raise ValueError ( ( 'Invalid file_path: %s' % file_path ) ) return result
retrieve full absolute path to the pack file .