linux backport

file exists system predicate
$source_file -> $user source
hide and make system preds
fix check_head_and_body
user_expansion never fails
goal expansion is controlled b dynamic procedure
add must_be_of_type predicate_indicator
fix neat_call, debug flag is user controlled
use simplecudd, not ptoblogbdd
compile all of myddas
fx junk in file_name
fix warnings
use common file opening struct and funds
avoid pairs module
fix db queues
This commit is contained in:
Vítor Santos Costa
2016-01-04 14:11:09 +00:00
parent c0f00e7a0f
commit 50c8724322
51 changed files with 1576 additions and 948 deletions

View File

@@ -204,15 +204,6 @@ that it is up to the user to close the pipe.
The atom _File_ corresponds to an existing file.
*/
/** @pred file_exists(+ _File_,+ _Permissions_)
The atom _File_ corresponds to an existing file with permissions
compatible with _Permissions_. YAP currently only accepts for
permissions to be described as a number. The actual meaning of this
number is Operating System dependent.
*/
/** @pred file_property(+ _File_,? _Property_)
@@ -567,16 +558,6 @@ file_property(File, Type, Size, Date, Permissions, LinkName) :-
file_property(File, Type, Size, Date, Permissions, LinkName, Error),
handle_system_internal(Error, off, file_property(File)).
file_exists(File) :-
var(File), !,
throw(error(instantiation_error,file_exists(File))).
file_exists(File) :-
\+ atom(File), !,
throw(error(type_error(atom,File),file_exists(File))).
file_exists(IFile) :-
true_file_name(IFile, File),
file_property(File, _Type, _Size, _Date, _Permissions, _, Error),
var(Error).
file_exists(File, Permissions) :-
var(File), !,