Path separators
The path separator used for specifying file names is dependent on the underlying file system. Applications can obtain the path separator by sending either the pathSeparator or pathSeparatorString messages to CfsDirectoryDescriptor class, which answers the path separator as a character, and as a string, respectively. Both have their uses, as demonstrated here:
"Check if a path ends with a path separator"
^'/usr/local/bin/' last = CfsDirectoryDescriptor pathSeparator.
"Build a path starting with the first root directory"
| firstRoot |
firstRoot := CfsDirectoryDescriptor rootDirectories first.
^firstRoot, 'data', CfsDirectoryDescriptor pathSeparatorString, 'mystuff'.
Last modified date: 01/29/2015