anchor.diff:  
   %%--------------------------------------------------------------------
   %% @doc
  -%% Sets link's scopes for links connected with given space.
  -%% @end
  -%%--------------------------------------------------------------------
  --spec set_link_context_for_space(SpaceId :: datastore:key()) -> ok.
  -set_link_context_for_space(SpaceId) ->
  -    ok.
  -
  -%%--------------------------------------------------------------------
  -%% @doc
   %% Add shareId to file meta
   %% @end
   %%--------------------------------------------------------------------
  
positive.code:     attach_location(Entry, LocId, ProviderId);
  attach_location(Entry, LocId, ProviderId) ->
      {ok, #document{key = FileId} = FDoc} = get(Entry),
      set_link_context(FDoc),
      datastore:run_transaction(fun() ->
          ok = datastore:add_links(?LINK_STORE_LEVEL, FDoc, {location_ref(ProviderId), {LocId, file_location}}),
          ok = datastore:add_links(?LINK_STORE_LEVEL, LocId, file_location, {file_meta, {FileId, file_meta}})
  
negative.code:     delete(Key);
  delete(#document{value = #file_meta{name = FileName, version = Version}, key = Key} = Doc) ->
      ?run(begin
          case datastore:fetch_link(?LINK_STORE_LEVEL, Key, ?MODEL_NAME, parent) of
              {ok, {ParentKey, ?MODEL_NAME}} ->
                  ok = delete_child_link_in_parent(ParentKey, FileName, Key),
  