Subject: Re: Temporary files problems

From: Jan Wielemaker <[email-masked]>
Date: Thu, 27 May 1999 12:32:44 +0200

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