IanSav wrote: ↑Fri Jul 27, 2018 23:05
How does the display look for a directory?
The mode string copies the mode string in
ls -l, so a
0777-mode directory will be
drwxr-xr-x.
More fully, the first character of the mode string in the list headers is:
'-': Regular file
'd': Directory
'l': Symbolic link
'c': Character device
'b': Block device
's': Unix domain Socket
'p': FIFO (aka 'named pipe')
Each 'x' bit position can take 1 of 4 values for the user and group:
'-': not execute and not setu/gid
'x': execute and not setu/gid
'S': not execute and setu/gid (this is a rarely-used combination)
's': execute and setu/gid
And for the permissions for "other":
'-': not execute and not sticky
'x': execute and not sticky
'T': not execute and sticky (this is a rarely-used combination)
't': execute and sticky
In the file info popup, the file type character isn't displayed, because that information is already spelt out in the "Type" field.
Unless the font is fixed-width, the width of the symbolic mode string will vary slightly depending on its contents.
IanSav wrote: ↑Fri Jul 27, 2018 23:05
Is it easy to make these items appear in fixed columns so that the details don't jump around as you move up and down the file list?
There are three options for that that i can think of:
- fixed-width font for the file info line (and if so, perhaps for the file path text, too), but since the size text is variable length, that would need to go last.
- 3 Label fields instead of 1 (mode, size, modification time)
- A single-line TemplatedMultiContent "list"
As mentioned above, unless the mode string is in a fixed-width font, so it will jiggle about a bit as the mode string changes anyway.
IanSav wrote: ↑Fri Jul 27, 2018 23:05
If space is tight I would be happy to lose the "Mode" key word. I think the leading zero is significant and should stay.
I'm happy for the "Mode" to stay or go. I think that the
ls -l style mode info makes it clearer that it is the mode, at least for people familiar with the U*ix
ls command. As I said in the previous post, the 4-digit octal mode value simply reflects the full 12-bit permissions part of the file mode.
The complete file mode is:
TTTTsstrwxrwxrwx
Where
T are the file type bits (file, directory, character special, block special, etc),
s are the set uid/gid bits, in that order,
t is the sticky bit and
rwx are read/write execute permission bits for user (owner), group and others, in that order.
IanSav wrote: ↑Fri Jul 27, 2018 23:05
I am also used to seeing the modes on the left of the line. Would you consider trying changing the order of the details?
I simply left the order unchanged (the code that creates the mode info string has been completely re-written). I have no strong feelings about the order.
The
ls -l order is mode, size, modification time.
Unix trivia time: is anyone old enough to know what the original purpose of the sticky bit was without looking it up? It dates to Version 6 Unix.