[ADC-Ext 1.0.8] New parameters for partial lists

Locked
maksis
Junior Member
Posts: 23
Joined: 26 Nov 2010, 19:36
Contact:

[ADC-Ext 1.0.8] New parameters for partial lists

Post by maksis » 25 Jun 2013, 15:43

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".

Ayo
Junior Member
Posts: 27
Joined: 23 Feb 2011, 13:50

Re: New parameters for partial lists

Post by Ayo » 25 Jun 2013, 16:04

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

maksis
Junior Member
Posts: 23
Joined: 26 Nov 2010, 19:36
Contact:

Re: New parameters for partial lists

Post by maksis » 25 Jun 2013, 16:15

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.

Ayo
Junior Member
Posts: 27
Joined: 23 Feb 2011, 13:50

Re: New parameters for partial lists

Post by Ayo » 25 Jun 2013, 16:45

maksis wrote: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).
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.
maksis wrote:[..] because the duplicates aren't show in the actual file list.
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.

maksis
Junior Member
Posts: 23
Joined: 26 Nov 2010, 19:36
Contact:

Re: New parameters for partial lists

Post by maksis » 25 Jun 2013, 18:19

Ayo wrote: 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.
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? :p DC++ won't even count TTH duplicates in the total share size but AirDC does that.
Ayo wrote: 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'm talking about duplicates determined by the file/directory name on the same level that are also forbidden in file lists by the spec.

Pretorian
Site Admin
Posts: 214
Joined: 21 Jul 2009, 10:21

Re: New parameters for partial lists

Post by Pretorian » 01 Jul 2013, 17:21

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" />
----

maksis
Junior Member
Posts: 23
Joined: 26 Nov 2010, 19:36
Contact:

Re: New parameters for partial lists

Post by maksis » 20 Dec 2013, 16:25

Pretorian wrote:The attribute is the size of the directory as indicated in a RES.
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.

maksis
Junior Member
Posts: 23
Joined: 26 Nov 2010, 19:36
Contact:

Re: New parameters for partial lists

Post by maksis » 20 Dec 2013, 16:33

Ayo wrote: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
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) :p

Locked