Directory pathnames in code can be used mostly with or without a separator character at the end. So for example, the following commands in a Unix shell are identical:
Or similarly in a Windows console:
Also notably, most servers don't care about a (missing) slash after a URL path:
Occasionally, I've seen this exchangeability reflected by inconsistent usage in plain text, where directory names are presented to the reader sometimes with a separator at the end and sometimes without, even in the same context.
When writing human-readable text, like a manual page or a log entry, when is it a good idea to append a directory separator after a pathname, and when not? What are advantages and disadvantages of the different representations?