[ Obsolete | Reference Manual | Alphabetic Index ]
pathname(+FilePath, -Path)
Succeeds if the pathname FilePath, if stripped of its file name, gives
Path, the path up to the parent directory of the file.
- FilePath
- String or atom.
- Path
- Variable or string.
This built-in predicate is obsolete!
Description
Used to check if the pathname FilePath, when stripped of its file name,
unifies with Path, the path up to the parent directory of the file.
pathname(File, Path) is equal to pathname(File, Path, _).
Modes and Determinism
Exceptions
- (4) instantiation fault
- FilePath is not instantiated.
- (5) type error
- FilePath is not a string or atom.
- (5) type error
- Path is neither a string nor a variable.
Examples
Success:
[eclipse]: pathname("/home/user/userfile", P).
P = "/home/user/"
yes.
pathname("/home/user","/home/").
pathname("/home/","/home/").
pathname("/home","/").
pathname("/","/").
Fail:
pathname("/home/","/").
Error:
pathname(F,P). (Error 4).
pathname('/home/user/',P). (Error 5).
See Also
pathname / 4, pathname / 3, suffix / 2