Handling Windows file name conventions without unix (Posix) package?

Hello, The unix package (System.Posix) is not supported under Windows and I wonder if there is an alternative solution that deals with the odd file naming convention under windows (backward vs unix forward slash), spaces in file names, etc. It looks like System.Environment is a good substitute for System.Posix.Env, but it is not clear how to deal with file naming conventions. Any pointers or tips would be much appreciated. Thanks, Dominick

Dominick,
I recommend looking at the unix-compat package when working on non-posix
systems.
http://hackage.haskell.org/package/unix-compat-0.4.1.1/docs/System-PosixComp...
As far as dealing with the different file conventions across OS's, I
recommend looking at the filepath library. It has functions for dealing w/
filepaths agnostically.
http://hackage.haskell.org/package/filepath-1.3.0.2/docs/System-FilePath-Win...
On Sat, Apr 12, 2014 at 11:56 PM, Dominick Samperi
Hello,
The unix package (System.Posix) is not supported under Windows and I wonder if there is an alternative solution that deals with the odd file naming convention under windows (backward vs unix forward slash), spaces in file names, etc.
It looks like System.Environment is a good substitute for System.Posix.Env, but it is not clear how to deal with file naming conventions.
Any pointers or tips would be much appreciated.
Thanks, Dominick _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
-- Cell: 1.630.740.8204

On 13/04/2014 05:56, Dominick Samperi wrote:
odd file naming convention under windows (backward vs unix forward slash), spaces in file names, etc Surely spaces and shell wildcard characters are valid in UNIX filenames too?

On 14-04-13 12:56 AM, Dominick Samperi wrote:
The unix package (System.Posix) is not supported under Windows and I wonder if there is an alternative solution that deals with the odd file naming convention under windows (backward vs unix forward slash), spaces in file names, etc.
module System.FilePath is a common interface providing the right thing for the hosting OS. It comes with GHC. For example you can use the > operator without worry.
participants (4)
-
Albert Y. C. Lai
-
David Johnson
-
Dominick Samperi
-
james