Make FilePath,FilePath.Component and FilePath.Root adopt ExpressibleByStringInterpolation

if we make FilePath adopt ExpressibleByStringInterpolation, we can use FilePath like this

let filePath: FilePath = "/xx/\(yy)"

swift-system isn't part of the standard library—I think you can file an issue in that repository if that's consistent with how the project solicits contributions.

Note that / is not the universal path separator. Consider if we used : (the HFS arc separator) or \ (the Windows arc separator). The string interpolation would be step back for a proper path representation.

3 Likes

sorry, I don't know which category this topic should be in. swift-system reviewer suggest that I start a thread on this form to discuss the addition of this protocol.

1 Like

Cool—looks like it's been adjusted to the appropriate topic.