implementation of file-related modules
wolfgang.thaller at gmx.net
Mon Oct 20 13:07:41 EDT 2003
Keith Wansbrough wrote:
>> I find it harder to think why I would want to know where Windows
>> store their configuration files.
> Furthermore, the location isn't fixed on Windows: it might be
> C:\WINDOWS\System (the most usual), or D:\WINDOWS\System (also
> possible), or <arbitrary-windows-path>\System (because the user can
> specify anything they like at install time).
> So config-file location has to be per machine, not per OS.
> Which suggests not putting it in the module
> heirarchy... Platform.UK.AC.CAM.CL.GLIA-NT.configDirectory, anyone? :)
I think it is a platform-dependent IO action:
getConfigDirectory :: IO String
This might simply be
getConfigDirectory = return "/etc/"
... but on Windows, where the directories aren't fixed, and on Mac OS,
where the directories are fixed but developers are told not to rely on
that fact, we can use OS-specific functions for finding the correct
(Bit is \Windows\System really for config files? I thought DLLs and
drivers go there... but then I don't use Windows much.)
More information about the Libraries