anchor.diff:  %%% Internal functions
   %%%===================================================================
   
  +
  +%%--------------------------------------------------------------------
  +%% @doc
  +%% Internel helper function for rename/2.
  +%% @end
  +%%--------------------------------------------------------------------
   -spec rename3(Subject :: datastore:document(), ParentUUID :: uuid(), {name, NewName :: name()} | {path, NewPath :: path()}) ->
       ok | datastore:generic_error().
   rename3(#document{value = #file_meta{name = OldName}} = Subject, ParentUUID, {name, NewName}) ->
  
positive.code:     end).
  
  
  -spec is_valid_filename(path()) -> boolean().
  is_valid_filename(<<"">>) ->
      false;
  is_valid_filename(FileName) when not is_binary(FileName) ->
  
negative.code:         _  -> false
      end.
  
  
  %%--------------------------------------------------------------------
  %% @doc
  %% Returns just error reason for given error tuple
  %% @end
  %%--------------------------------------------------------------------
  -spec normalize_error(term()) -> term().
  normalize_error({badmatch, Reason}) ->
      normalize_error(Reason);
  