Formats a permission bit using the “ls
-l” convention. The bit argument is true if the permission is
granted, false otherwise. The flag argument is returned if the permission
is true, otherwise the method returns "-".
# - - - P a t h I n f o . _ _ d a s h e r - - -
def __dasher ( self, bit, flag ):
"""Format a permission bit as in ls -l.
[ (bit is a Boolean value) and (flag is a string) ->
if bit is true ->
return flag
else -> return "-" ]
"""
if bit: return flag
else: return "-"