Mercurial > hgrepos > Python > apps > py-cutils
diff cutils/util/walk.py @ 352:b256ae4f4bc8
treesum: implement the "filetypes" command to show all the filetype indicators that are used in digest output
| author | Franz Glasner <fzglas.hg@dom66.de> |
|---|---|
| date | Tue, 01 Apr 2025 20:38:06 +0200 |
| parents | 0a58948df713 |
| children | 7761a15b9736 |
line wrap: on
line diff
--- a/cutils/util/walk.py Tue Apr 01 20:15:03 2025 +0200 +++ b/cutils/util/walk.py Tue Apr 01 20:38:06 2025 +0200 @@ -28,6 +28,75 @@ from . import PY2 +HELP_FILETYPE_INDICATORS = r""" +FILETYPE INDICATORS +=================== + +File and directory paths are printed using names analogous to calling +"ls -F/--classify". The indicator strings (aka "marker" or "tags") are +appended to their names as follows. + +Some standard indicators are: + + / + denotes a directory + + /./@/ + denotes a symbolic link to a directory + + /./@ + Classifies a symlink to a regular filesystem object (i.e. a regular file). + The target objects are not classified as directories or other special + filesystem objects. + Also used if a symbolic link is broken and the target type cannot + determined. + + /./| --- /./@| + FIFO --- symlink to FIFO + + /./= --- /./@= + Socket --- symlink to socket + + /./> --- /./@> + Door -- symlink to door. + + Solaris. + + /./% --- /./@% + Whiteout --- symlink to whiteout. + + Typically Used by union filesystems) (BSD). + +More non-standard indicators are: + + /./: --- /./@: + Character special device --- symlink to character special device + + /./; --- /./@; + Block special device --- symlink to block special device + + /./+ --- /./@+ + Event port --- symlink to event port. + + Solaris, Illumos. + +In an aggregated (directory) checksum at the end of a block the following +indicators are used: + + ./@/ + Symbolic link to a directory + + ./@ + Symbolic link to other filesystem object. + + Also used if the link is broken and the target type cannot determined. + +NOTE: Executable files have no special indicator here. The "ls -F" command + would use the `*' character in this case. + +""" + + _notset = object() _logger = logging.getLogger(__name__)
