anchor.diff:          {ok, #file_attr{guid = Guid}} ->
               {ok, ObjectId} = file_id:guid_to_objectid(Guid),
               {ok, [#{<<"id">> => ObjectId, <<"path">> => Path}]};
  -        Error ->
  -            Error
  +        {error, Errno} ->
  +            ?ERROR_POSIX(Errno)
      end;
   
   get(#op_req{client = Cl, data = Data, gri = #gri{id = FileGuid, aspect = attrs}}, _) ->
  -    SessionId = Cl#client.id,
  +    SessionId = Cl#client.session_id,
       Attributes = case maps:get(<<"attribute">>, Data, undefined) of
           undefined -> ?ALL_BASIC_ATTRIBUTES;
           Attr -> [Attr]
  
positive.code:     case logical_file_manager:stat(SessionId, {guid, FileGuid}) of
          {ok, Attrs} ->
              {ok, gather_attributes(#{}, Attributes, Attrs)};
          {error, _} = Error ->
              Error
      end;
  
  get(#op_req{client = Cl, data = Data, gri = #gri{id = FileGuid, aspect = xattrs}}, _) ->
      SessionId = Cl#client.id,
      Inherited = maps:get(<<"inherited">>, Data, false),
  
      case maps:get(<<"attribute">>, Data, undefined) of
          undefined ->
              case logical_file_manager:list_xattr(
                  SessionId, {guid, FileGuid}, Inherited, true
              ) of
                  {ok, Xattrs} ->
                      {ok, lists:foldl(fun(XattrName, Acc) ->
                          {ok, #xattr{value = Value}} = logical_file_manager:get_xattr(
                              SessionId,
                              {guid, FileGuid},
                              XattrName,
                              Inherited
                          ),
                          Acc#{XattrName => Value}
                      end, #{}, Xattrs)};
                  {error, _} = Error ->
                      Error
              end;
          XattrName ->
              case logical_file_manager:get_xattr(
                  SessionId, {guid, FileGuid}, XattrName, Inherited
              ) of
                  {ok, #xattr{value = Value}} ->
                      {ok, #{XattrName => Value}};
                  {error, _} = Error ->
                      Error
              end
      end;
  
  get(#op_req{client = Cl, data = Data, gri = #gri{id = FileGuid, aspect = json_metadata}}, _) ->
      SessionId = Cl#client.id,
  
      Inherited = maps:get(<<"inherited">>, Data, false),
      FilterType = maps:get(<<"filter_type">>, Data, undefined),
  
negative.code: %%--------------------------------------------------------------------
  -spec get(op_logic:req(), op_logic:entity()) -> op_logic:get_result().
  get(#op_req{client = Cl, data = Data, gri = #gri{id = FileGuid, aspect = list}}, _) ->
      SessionId = Cl#client.session_id,
      Limit = maps:get(<<"limit">>, Data, ?DEFAULT_LIST_ENTRIES),
      Offset = maps:get(<<"offset">>, Data, ?DEFAULT_LIST_OFFSET),
      {ok, Path} = ?call_lfm(get_file_path(SessionId, FileGuid)),
  
      case logical_file_manager:stat(SessionId, {guid, FileGuid}) of
          {ok, #file_attr{type = ?DIRECTORY_TYPE, guid = Guid}} ->
              {ok, Children} = ?call_lfm(ls(SessionId, {guid, Guid}, Offset, Limit)),
              {ok, lists:map(fun({ChildGuid, ChildPath}) ->
                      {ok, ObjectId} = file_id:guid_to_objectid(ChildGuid),
                      #{<<"id">> => ObjectId, <<"path">> => filename:join(Path, ChildPath)}
  