Allow keystroke to remove/rescan selected file/dir
The idea is to have a shortcut like 'x' or 'r' to remove the selected file/dir when scrolling trough the view and have the view jump to the upper directory and refresh this one as well as every directory above by a simple substraction (without a scan).
Also a shortcut to rescan the selected directory would be cool (if other apps changed it).
That's a good idea. That will require some changes to the core design since godu has been designed to be read only, 1 walk through. I'll think about it and I'm open to suggestions.
I did not have a look at the code, but from the top of my head, I would suggest something like this:
A tree structure: parent-nodes that are directories to child-nodes that are directories or files. Each node would have 5 properties: 'name', 'size' (in bytes), 'path' (or 'parents'), 'children' and an 'isDirectory' boolean. Now when a node gets deleted, each node of the path is visited and the size of the deleted node is subtracted from each parent node. When a rescan is done, the difference between the former size and the new size is calculated and added to each parent node.
The structure you described roughly reflects the implementation. The main issue I see is that the original design parses the file data into a read-only structure.