[ADC-Ext 1.0.8] New parameters for partial lists

Both parameters should only be used with directories that have been marked with the “Incomplete” flag.

“Size” - Shows the recursive size for directories, uses the same format as the Size parameter for files
“Children” - a flag that is used with directories that contain sub-directories. AirDC++ 2.50 uses this flag to determine whether an incomplete directory should have an expand sign (+) in the tree view. Used as “Children=1”.

Does the “Size” parameter count duplicate files multiple times or just once?

I’d say that it should behave similar to reporting directory sizes for search results (but the spec doesn’t say anything about duplicate files). AirDC++ currently includes duplicate files in different real paths in that size but that’s not really the optimal case because the duplicates aren’t show in the actual file list.

If you’re talking about the SI perameter to RES, I was under the impression that it is only included for files, not directories. But the spec doesn’t even mention that, heh. There’s also the SS flag in INF - the spec doesn’t say anything about duplicates there, either, but if I remember correctly all clients do count dupes only once in that field.

Wait, are duplicate files hidden in the file browser?

As for whether or not to include duplicate files in the directory sizes, I’m mostly neutral. If it’s only going to be used for displaying purposes, then it probably doesn’t even matter that much if different implementations will behave differently in this aspect. In any case, I believe it’s a good idea to allow implementations to count duplicates multiple times, since excluding duplicates for each directory may complicate the code somewhat.

I understand the specs in a way that the SI should be added for all RES commands. Even ncdc seems to add that parameter for directories already? :stuck_out_tongue: DC++ won’t even count TTH duplicates in the total share size but AirDC does that.

I’m talking about duplicates determined by the file/directory name on the same level that are also forbidden in file lists by the spec.

The following is what I intend to push to ADC-Ext with.

=== ‘Size’ attribute in file list
This extension adds a ‘Size’ attribute to directories in a file list. The attribute is the size of the directory as indicated in a RES.

Implementations should be conservative when it includes the Size attribute. Only including the attribute in partial file lists can decrease overall network load requirements.

The following change is done to the file list XML schema:

The Size attribute from BASE is referenced in the Directory element:

<xs:attribute ref=“Size” use=“optional” />



=== ‘Children’ attribute in file list
This extension adds a ‘Children’ attribute to directories in a file list. The attribute indicates whether there are additional sub-directories.

Value ‘1’ indicate that there are children.

This attribute only makes sense in partial file lists.

The following changes are done to the file list XML schema:

A new attribute is defined:

<xs:attribute name=“Children” type=“zeroOne” />

The attribute is then referenced in the Directory element:

<xs:attribute ref=“Children” use=“optional” />

That comment kind of suggests the reader to search the specs for how the size indicated in a RES… but that’s not specified anywhere. Feels like an unnecessary comment to me.

It doesn’t even seem to be clear that it should be included for directories (which can be understood as directory search results don’t have size in NMDC) :stuck_out_tongue: