+
Point of view
All features
deferred class PATH_JOINER
Summary
A protocol for PATH_NAMEs to describe themselves to other objects.
A typical session goes like this:
  1. call start_join describing you drive (if any) and whether you are absolute or relative
  2. Repeatedly call the join_xxx procedures to describe yourself, more significant elements first (i.e. generally left-to-right)
  3. call end_join
Caveat: the only way to make sure that the target is not changed at all is by not starting a session. A call to start_join (even with drive=Void and absoluteness=0) immediately followed by a call to end_join can have some benign side-effect on the target (including some amount of normalization being performed).
Direct parents
Insert list: ANY
Known children
Inherit list: PATH_NAME, PATH_NAME_NOTATION
Overview
Features
{PATH_JOINER}
  • start_join (drive: STRING, absoluteness: INTEGER_32)
    Start joining an absolute path to Current
    drive is optional absoluteness is, e.g., the number of leading slashes:
      0 for relative paths
      1 for absolute paths
      more for super-absolute paths (for instance, network-wide)
    
  • join_directory (element: STRING)
    Add a directory to the end of the path
  • join_up
    Go up one directory
  • join_file (element: STRING)
    Add a file to the end of the path
  • join_element (element: STRING)
    Add an unspecified element (directory or file) to the end of the path
  • join_extension (an_extension: STRING)
    Add an extension to the last element of the path
  • end_join
    Finish joining the path
  • join_error: BOOLEAN
    Did an error occur during joining
start_join (drive: STRING, absoluteness: INTEGER_32)
deferred procedure
Start joining an absolute path to Current
drive is optional absoluteness is, e.g., the number of leading slashes:
  0 for relative paths
  1 for absolute paths
  more for super-absolute paths (for instance, network-wide)
require
  • absoluteness >= 0
join_directory (element: STRING)
effective procedure
Add a directory to the end of the path
require
  • element /= Void
ensure
join_up
deferred procedure
Go up one directory
ensure
join_file (element: STRING)
effective procedure
Add a file to the end of the path
require
  • element /= Void
ensure
join_element (element: STRING)
deferred procedure
Add an unspecified element (directory or file) to the end of the path
require
  • element /= Void
ensure
join_extension (an_extension: STRING)
deferred procedure
Add an extension to the last element of the path
require
  • an_extension /= Void
ensure
end_join
deferred procedure
Finish joining the path
ensure
join_error: BOOLEAN
deferred function
Did an error occur during joining