From nicos@soi.city.ac.uk Wed Apr 11 10:59:51 2001
Received: from altair.soi.city.ac.uk (altair.soi.city.ac.uk [138.40.91.7])
	by swi.psy.uva.nl (8.11.2/8.11.2) with ESMTP id f3B8xo312275;
	Wed, 11 Apr 2001 10:59:51 +0200 (MET DST)
Received: from localhost (nicos@localhost)
	by altair.soi.city.ac.uk (8.11.2/8.11.2) with SMTP id f3B8xjX12903;
	Wed, 11 Apr 2001 09:59:45 +0100 (BST)
Date: Wed, 11 Apr 2001 09:59:45 +0100 (BST)
From: Nicos Angelopoulos <nicos@soi.city.ac.uk>
To: Jan Wielemaker <jan@swi.psy.uva.nl>
cc: prolog@swi.psy.uva.nl
Subject: Re: [SWIPL] absolute_file_name/2
In-Reply-To: <01041110444901.22631@gollem>
Message-ID: <Pine.GSO.4.02A.10104110954580.9241-100000@altair.soi.city.ac.uk>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII



On Wed, 11 Apr 2001, Jan Wielemaker wrote:

> 
> I was almost trapped too, but the answer is correct. 
> absolute_file_name/2 doesn't treat any character except for / (and \ and
> the start sequence drive: on windows) special.  Hence it expands to the
> absolute-path for a file named ~ in the current directory.
> 
> What you are looking for is expand_file_name(+Spec, -ListOfExpansions)
> that handles ~, $var, *, ? and {...}, expanding to a list of matching
> files.
> 
> This has been changed (see ChangeLog) rather long ago as especially on
> windows names tend to have ~ and $ all over the place, leading to weird
> results and errors.
> 
> 	--- Jan
> 

	thank you i did get around to  use expand_file_name/2
	
	so, is the case that the manual entry is outdated then ?
	my original question was in reference to the manual as 
	well to the behaviour of the predicate.

	from 4.0.2 manual
	absolute_file_name(+File, -Absolute)
    Expand Unix file specification into an absolute path. User home
directory expansion (~ and  <user>) and variable
    expansion is done. The absolute path is canonised: references to . and
.. are deleted. SWI-Prolog uses absolute file
    names to register source files independent of the current working
directory. See also absolute_file_name/3. 

Regards 

Nicos.




