[clean-list] Some examples about the Directory library

Arjen van Weelden arjenw@zonnet.nl
Thu, 18 Dec 2003 18:52:09 +0100


> Jerzy Karczmarczuk writes (to the Clean discussion list):
> 
>> What's wrong with the following?
>>
>> module dirmod
>> import StdEnv,StdIO,Directory
>>
>> ff world = getDirectoryContents
>>   (AbsolutePath "D" [PathDown "\\Work"]) world
>>
>> Start :: *World -> ([DirEntry],*World)
>> Start world
>>   # ((a,b),world) = ff world
>>   = (b,world)
>>
>> //====
>>

The error is caused by the "\\" you used in "\\Work". The PathDown is 
introduced by this library to abstract from platform dependent directory 
separators. Try changing it to "Work".

regards,
	Arjen