Navigation
Synopsis Locations can be concatenated with strings to add segments to the path component
Syntax Loc + Str
Types
Loc Str Loc + Str
loc str loc
Description Adds a segment to the path component of a location. This concatenation introduces a path separator (/) automatically.
Examples
rascal>|tmp:///myDir| + "myFile";
loc: |tmp:///myDir/myFile|
To get the original back, you can use the parent field:
rascal>(|tmp:///myDir| + "myFile").parent
loc: |tmp:///myDir|
Is this page unclear, or have you spotted an error? Please add a comment below and help us to improve it. For all other questions and remarks, visit ask.rascal-mpl.org.