From jan@swi.psy.uva.nl  Thu May 27 12:40:26 1999
Received: from gollem.swi.psy.uva.nl (jan@gollem.swi.psy.uva.nl [145.18.114.15])
	by swi.swi.psy.uva.nl (8.9.3/8.9.3) with ESMTP id MAA14009
	for <prolog@swi.psy.uva.nl>; Thu, 27 May 1999 12:40:26 +0200 (MET DST)
Received: from localhost (localhost [[UNIX: localhost]])
	by gollem.swi.psy.uva.nl (8.8.8/8.8.8) id MAA00409;
	Thu, 27 May 1999 12:41:39 +0200
From: Jan Wielemaker <jan@swi.psy.uva.nl>
To: prolog@swi.psy.uva.nl, ROCA Jose <jose.roca@eurocontrol.be>
Subject: Re: Temporary files problems
Date: Thu, 27 May 1999 12:32:44 +0200
X-Mailer: KMail [version 0.7.9]
Content-Type: text/plain
References: <199905270956.LAA26613@acrux.mis.eurocontrol.be>
MIME-Version: 1.0
Message-Id: <99052712413900.00291@gollem>
Content-Transfer-Encoding: 8bit

On Thu, 27 May 1999, ROCA Jose wrote:
>Hello all,
>
>I am having some problems with the file access predicates and the temporary
>files created by other programs in
>Windows environments. These predicates tend to generate exceptions.
>
>For instance, the last one I hit is:
>
>?- exists_directory('~$tl0403.txt.p2').
>[WARNING: variable `tl0403' does not exist]
>   Exception: (  8) exists_directory('~$tl0403.txt.p2') ? 
>
>
>~$tl0403.txt.p2 is the funny name Word uses for a temporary file.
>
>Is there a simple solution for this problem?

Not really, I'm afraid.  All file-access functions use file-name
expansion, giving special meaning to the ~ and $ characters (based
on Unix expansion).

Probably it would be a good idea to make this depend on some flag,
and set this to `false' by default, so only expand_file_name/2 and
absolute_file_name/[2,3] can be used to expand environment variables
and the ~.  I will have a look at this.

	Regards --- Jan

