foundation icon indicating copy to clipboard operation
foundation copied to clipboard

No simple way to convert String to FilePath

Open ghost opened this issue 7 years ago • 1 comments

When getting arguments as strings from command line there is no function to convert it to a filepath so it can be used to open files. This case is very common, thus should be made easy to do.

ghost avatar Dec 20 '17 03:12 ghost

I agree, it is missing. Would be nice to have a proper function to convert from a String and from a LString.

In the mean while, FilePath is an instance of IsString so you can use fromString but an error will throw an exception ContiguousPathSeparator (which is unfortunately not exported).

NicolasDP avatar Dec 20 '17 11:12 NicolasDP