anchor.diff:    Result :: term().
   %% ====================================================================
   
  +save_file_descriptor(ProtocolVersion, File, Validity) ->
  +  Pid = self(),
  +
  +  Descriptor = update_file_descriptor(File#veil_document.record, Validity),
  +
  +  Ans = gen_server:call(?Dispatcher_Name, {dao, ProtocolVersion, Pid, 100, {vfs, save_descriptor, [File#veil_document{record = Descriptor}]}}),
  +  wait_for_dao_ans(Ans, File, 100, "save_descriptor").
  +
   save_file_descriptor(ProtocolVersion, File, FuseID, Validity) ->
     Pid = self(),
  -
  +  Ans = gen_server:call(?Dispatcher_Name, {dao, ProtocolVersion, Pid, 1, {vfs, list_descriptors, [{by_file_n_owner, {File, FuseID}}, 0, 10]}}),
  +  {Status, TmpAns} = wait_for_dao_ans(Ans, File, 1, "list_descriptors"),
  +  case Status of
  +    ok ->
  +      case size(TmpAns) of
  +        0 -> save_new_file_descriptor(ProtocolVersion, File, FuseID, Validity);
  +        1 ->
  +          [VeilDoc | _] = TmpAns,
  +          save_file_descriptor(ProtocolVersion, VeilDoc, Validity);
  +        _Many -> {error, "Error: too many file descriptors"}
  +      end;
  +    _Other -> {Status, TmpAns}
  +  end.
  +
  +save_new_file_descriptor(ProtocolVersion, File, FuseID, Validity) ->
  +  Pid = self(),
  +
  +  Descriptor = update_file_descriptor(#file_descriptor{file = File, fuse_id = FuseID}, Validity),
  +
  +  Ans = gen_server:call(?Dispatcher_Name, {dao, ProtocolVersion, Pid, 100, {vfs, save_descriptor, [Descriptor]}}),
  +  wait_for_dao_ans(Ans, File, 100, "save_descriptor").
  +
  +update_file_descriptor(Descriptor, Validity) ->
     {Megaseconds,Seconds, _Microseconds} = os:timestamp(),
     Time = 1000000*Megaseconds + Seconds,
  -  Descriptor = #file_descriptor{file = File, fuse_id = FuseID, create_time = Time, expire_time = Validity},
  -
  -  Ans = gen_server:call(?Dispatcher_Name, {dao, ProtocolVersion, Pid, 100, {vfs, save_descriptor, [Descriptor]}}),
  -  wait_for_dao_ans(Ans, File, 100, "save_descriptor").
  +  Descriptor#file_descriptor{create_time = Time, expire_time = Validity}.
   
   %% wait_for_dao_ans/4
   %% ====================================================================
  
positive.code:           #filelocation{storage_helper = FileLoc#file_location.storage_helper_id, file_id = FileLoc#file_location.file_id, validity = Validity};
          _BadStatus2 -> #filelocation{storage_helper = TmpAns2, file_id = "Error", validity = 0}
        end;
      _BadStatus -> #filelocation{storage_helper = TmpAns, file_id = "Error", validity = 0}
    end;
  
  %% TODO zabezpieczyć na wypadek gdyby pytano o istniejący plik
  handle_fuse_message(ProtocolVersion, Record, FuseID) when is_record(Record, getnewfilelocation) ->
    {ParentFound, ParentInfo} = get_parent_and_name_from_path(Record#getnewfilelocation.file_logic_name, ProtocolVersion),
  
    case ParentFound of
      ok ->
        {FileName, Parent} = ParentInfo,
        Storage_helper = "helper1",
        File_id = "real_location_of" ++ FileName,
        FileLocation = #file_location{storage_helper_id = Storage_helper, file_id = File_id},
        File = #file{type = ?REG_TYPE, name = FileName, size = 0, parent = Parent, location = FileLocation},
  
        Pid = self(),
        Ans = gen_server:call(?Dispatcher_Name, {dao, ProtocolVersion, Pid, 1, {vfs, save_file, [File]}}),
        {Status, TmpAns} = wait_for_dao_ans(Ans, FileName, 1, "save_file"),
  
        Validity = ?LOCATION_VALIDITY,
        case Status of
          ok ->
            {Status2, TmpAns2} = save_file_descriptor(ProtocolVersion, File, FuseID, Validity),
            case Status2 of
              ok ->
                #filelocation{storage_helper = Storage_helper, file_id = File_id, validity = Validity};
              _BadStatus2 -> #filelocation{storage_helper = TmpAns2, file_id = "Error", validity = 0}
            end;
          _BadStatus -> #filelocation{storage_helper = TmpAns, file_id = "Error", validity = 0}
        end;
      _ParentError -> #filelocation{storage_helper = ParentInfo, file_id = "Error", validity = 0}
    end;
  
  handle_fuse_message(ProtocolVersion, Record, FuseID) when is_record(Record, filenotused) ->
    %% TODO - skasować desekryptor z bazy
    %% potrzebna w dao funkcja, która wyszukuje deskryptor po parze {plik, fuse_id},
    %% ewentualnie funkcja, która kasuje deskryptory posadające odpowiednią wartość pola {plik, fuse_id}
    #atom{value = "ok"};
  
  handle_fuse_message(ProtocolVersion, Record, FuseID) when is_record(Record, renewfilelocation) ->
    %% TODO - sprawdzić czy fuse ma prawa do pliku i jeśli tak to odnowić desekryptor w bazie
    %% potrzebna w dao funkcja, która wyszukuje deskryptor po parze {plik, fuse_id}
    #filelocationvalidity{answer = "ok", validity = ?LOCATION_VALIDITY};
  
  handle_fuse_message(ProtocolVersion, Record, FuseID) when is_record(Record, createdir) ->
    {ParentFound, ParentInfo} = get_parent_and_name_from_path(Record#createdir.dir_logic_name, ProtocolVersion),
  
negative.code: 
  create_children_list([File | Rest], Ans) ->
    FileDesc = File#veil_document.record,
    create_children_list(Rest, [FileDesc#file.name | Ans]).
  
  get_file(ProtocolVersion, File, FuseID) ->
    Pid = self(),
    Ans = gen_server:call(?Dispatcher_Name, {dao, ProtocolVersion, Pid, 1, {vfs, get_file, [File]}}),
    wait_for_dao_ans(Ans, File, 1, "get_file").