You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, the web view of directories lists the cumulative size, that is the on-disk size of directories. However, the ipfs file ls and the ipfs ls commands do not - the former always returns 0 (for the current directory) and the latter returns the size of the directory node only (the size of the list of links).
My personal stance is that there should be consistency between the web interface and the command line and at least one of the ls commands should return the cumulative size. However, @schomatis suggested in #4580 that a command line flag might be added to ipfs file ls and ipfs ls so that it returns the cumulative size for directories. I would suggest this would be in addition to the currently returned Size, similar to the way ipfs files stat returns both Size and CumulativeSize.
Alternately, he suggested adding an ipfs du command returning the 'on disk' size of items. But given that the current set of commands is already kind of a mess, I would strongly suggest not adding another command before giving it considerate thought.
Note that, to the best of my knowledge, ipfs file ls is to be deprecated over ipfs ls.
The text was updated successfully, but these errors were encountered:
@kjzz Sure. I won't have time to implement it myself but would be happy to reflect/discuss the feature as I would be an avid user thereof.
It would be great if we could also tackle #5807 - that is, if this information is already available from the context, i.e. it would not use extra resources. This would save us (=ipfs-search.com) an additional stat call. But it is not essential.
Hi, I also needed to know directory size when listing object for a project, so I've done a quite basic implementation in go of the list function of the ipfs shell that returns the directory size by recursively adding all object sizes:
Version information:
0.4.18
Type:
Enhancement
Description:
Currently, the web view of directories lists the cumulative size, that is the on-disk size of directories. However, the
ipfs file ls
and theipfs ls
commands do not - the former always returns0
(for the current directory) and the latter returns the size of the directory node only (the size of the list of links).My personal stance is that there should be consistency between the web interface and the command line and at least one of the
ls
commands should return the cumulative size. However, @schomatis suggested in #4580 that a command line flag might be added toipfs file ls
andipfs ls
so that it returns the cumulative size for directories. I would suggest this would be in addition to the currently returnedSize
, similar to the wayipfs files stat
returns bothSize
andCumulativeSize
.Alternately, he suggested adding an
ipfs du
command returning the 'on disk' size of items. But given that the current set of commands is already kind of a mess, I would strongly suggest not adding another command before giving it considerate thought.Note that, to the best of my knowledge,
ipfs file ls
is to be deprecated overipfs ls
.The text was updated successfully, but these errors were encountered: