From ef9b68234eb2f7fb86540f54cf2f3f52728c2065 Mon Sep 17 00:00:00 2001 From: Eshel Yaron Date: Fri, 9 Jun 2023 09:41:09 +0300 Subject: [PATCH] FIXED: directory_member/3: respect file_type(regular) option This allows 'directory_member/3' to generate regular (non-directory) files with option 'file_type(regular)', in accordance with how 'absolute_file_name/3' treats this option. --- filesex.pl | 3 +++ 1 file changed, 3 insertions(+) diff --git a/filesex.pl b/filesex.pl index 526f0c2..f85a7c9 100644 --- a/filesex.pl +++ b/filesex.pl @@ -367,6 +367,9 @@ matches_type(directory, Entry) :- !, exists_directory(Entry). +matches_type(regular, Entry) :- + !, + exists_file(Entry). matches_type(Type, Entry) :- \+ exists_directory(Entry), user:prolog_file_type(Ext, Type),