[Xfce-bugs] [Bug 16011] New: Make a "size on disk" for files and directories

bugzilla-daemon at xfce.org bugzilla-daemon at xfce.org
Sat Oct 5 14:40:06 CEST 2019


https://bugzilla.xfce.org/show_bug.cgi?id=16011

            Bug ID: 16011
           Summary: Make a "size on disk" for files and directories
    Classification: Xfce Core
           Product: Thunar
           Version: 1.8.9
          Hardware: All
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: Low
         Component: General
          Assignee: xfce-bugs at xfce.org
          Reporter: brunoaiss+xfce at gmail.com
  Target Milestone: 1.8.10

Created attachment 9085
  --> https://bugzilla.xfce.org/attachment.cgi?id=9085&action=edit
Properties window with "size on disk" of explorer

I believe it would be useful to users of Thunar to have a "size on disk"
ability incorporated into Thunar itself.
"Size on disk" is a feature explorer has (windows) which shows the real size
the selected files are taking on disk. (see attachment)

I believe it makes sense for Thunar to incorporate a "size on disk" for file
systems that support compression and equivalent where files may take a larger
portion in the storage than their respective size.

In my knowledge only AFS, BtrFS, HFS+, JFS, NTFS and zfs support transparent
compression.

I only know how to get the "size on disk" for btrfs but I believe someone can
come up with an algorithm for the others. As such, I believe it should be easy
enough to plugin ways of getting the size on disk into Thunar's details window.

As for btrfs. The steps, unfortunately, requires superuser; fortunately, this
code can run in C and making use of setuid().

The steps are:
ioctl() call: https://github.com/kilobyte/compsize/blob/master/compsize.c#L193
calculations to get the values here:
https://github.com/kilobyte/compsize/blob/master/compsize.c#L201-225
final calculations here:
https://github.com/kilobyte/compsize/blob/master/compsize.c#L118-178
radix tree used for calculations:
https://github.com/kilobyte/compsize/blob/master/radix-tree.c

The license of that code above is GPLv2.
The rest of the code is UI.

How feasible is such feature on Thunar?

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the Xfce-bugs mailing list