feat: Display total size of current directory#334
feat: Display total size of current directory#334krivahtoo wants to merge 1 commit intokamiyaa:mainfrom
Conversation
add option to display lazily loaded directory sizes
0757351 to
7485ae9
Compare
|
Hi! When I have not visited all sub-dirs, does Joshuto show the wrong directory size? If yes, is there some way to know which sub-dirs I have visited and which are not included in the total size yet? |
Yes. Without visiting sub-dirs, it will only calculate the total size of files in the directory.
No. Having such a feature would be great though I am not sure how it would be implemented without traversing the directory. |
|
Hm, I just have a concern that this behavior breaks user-expectations, because people either check the sizes of files or a directory fully recursive (maybe except of other file-system mounted in the sub-tree and alike). I have never seen such a “partial dir-size” calculation, and I would certainly not expect this. @fritzrehde was also asking for a Furthermore, users would not have a chance to see that their expectation is wrong unless they realize that “something with the size does not look right”. That's a dangerous combination in terms of usability, and in this case even more as a directory size might be considered in decisions about deleting, coping, or moving files. I also don't see a use-case for this “partial dir-size” where I have to remember what sub-dirs I have visited before, but maybe I'm missing something. Sorry, I don't want to interfere in your MR, and I'm really a fan of all your Joshuto contributions, but I have some serious concerns about this one. |
|
Okay, I see what you mean. Yeah, this will probably break user expectations. Thanks for your feedback. I think the solution would be to calculate but only show the size when all the files/dirs have been calculated and/or add a command to traverse the directory. This way the users would see the directory size only when it has been fully calculated. |
Add the option to display lazily loaded directory sizes.
The displayed size is not accurate, to get the actual size of a directory one has to navigate recursively to all its child directories.
Screenshot
closes #229