-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Description
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 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.