Subject: Re: [SWIPL] absolute_file_name/2

From: Nicos Angelopoulos <[email-masked]>
Date: Wed, 11 Apr 2001 09:59:45 +0100 (BST)

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.