UNPKG

@ciao-lang/ts-ciao-interface

Version:

Simple Ciao interface for node.

223 lines 102 kB
<!DOCTYPE HTML><html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><meta name="theme-color" content="#273f79"/><link rel="stylesheet" href="lpdoc.css" type="text/css"/><script type="text/javascript" src="lpdoc.js"></script><title>Operating system utilities &mdash; The Ciao System v1.22</title></head><body><div class="lpdoc-page fixleftbar"><a href="#" id="sidebar-toggle-button" class="lpdoc-navbutton"><span id="sidebar-button-arrow">&#9776;</span></a><div id="sidebar" class="lpdoc-sidebar"><div style="height: 40px; margin-left: auto; margin-right: auto"><img src="ciao-logo_autofig.png" width=auto height=100%></div><div class="lpdoc-nav"><span class="lpdoc-on-right"><a class="lpdoc-navbutton" href="StdLibs.html">&#x2191;</a><a class="lpdoc-navbutton" href="libpaths.html">&#x2190;</a><a class="lpdoc-navbutton" href="pathnames.html">&#x2192;</a><a class="lpdoc-navbutton" href="ciaosearch.html">&#x1F50D;</a></span><span><a href="ciaofulltoc.html">TOC</a></span></div><hr></hr><ul class="lpdoc-itemize-sectpath"><li><a href="ciao.html">The Ciao System</a> &raquo;<br/> </li><li><a href="StdLibs.html">PART VII - Standard libraries</a> &raquo;<br/> </li><li><a href=""><strong>Operating system utilities</strong></a></li></ul><hr></hr><em>ON THIS PAGE</em><ul><li><a href="#Usage and interface">Usage and interface</a></li><li><a href="#Documentation on exports">Documentation on exports</a></li><li><a href="#Documentation on imports">Documentation on imports</a></li></ul></div><div class="lpdoc-main"><div id=""><h1>Operating system utilities</h1><a class="lpdoc-idx-anchor" href="ciaosearch.html#system"></a> <strong>Author(s):</strong> <a class="lpdoc-idx-anchor" id="Daniel Cabeza" href="ciaosearch.html#Daniel Cabeza">Daniel Cabeza</a>, <a class="lpdoc-idx-anchor" id="Manuel Carro" href="ciaosearch.html#Manuel Carro">Manuel Carro</a>.<p> This module contains predicates for invoking services which are typically provided by the operating system. Note that the predicates which take names of files or directories as arguments in this module expect atoms, not <a class="lpdoc-idx-anchor" id="0" href="ciaosearch.html#path alias">path alias</a>es. I.e., generally these predicates will not call <a class="lpdoc-idx-anchor" id="1" href="iso_incomplete.html#absolute_file_name/2"><tt>absolute_file_name/2</tt></a> on names of files or directories taken as arguments.<br/><div id="Usage and interface"><h2>Usage and interface</h2><div class="lpdoc-cartouche"><ul><li><strong>Library usage:</strong><br/><tt>:- use_module(library(system)).</tt><li><strong>Exports:</strong><br/><ul class="lpdoc-itemize-minus"><li><em>Predicates:</em><br/><a class="lpdoc-idx-anchor" id="2" href="#now/1"><tt>now/1</tt></a>, <a class="lpdoc-idx-anchor" id="3" href="#datime/1"><tt>datime/1</tt></a>, <a class="lpdoc-idx-anchor" id="4" href="#datime/9"><tt>datime/9</tt></a>, <a class="lpdoc-idx-anchor" id="5" href="#copy_file/2"><tt>copy_file/2</tt></a>, <a class="lpdoc-idx-anchor" id="6" href="#copy_file/3"><tt>copy_file/3</tt></a>, <a class="lpdoc-idx-anchor" id="7" href="#getenvstr/2"><tt>getenvstr/2</tt></a>, <a class="lpdoc-idx-anchor" id="8" href="#setenvstr/2"><tt>setenvstr/2</tt></a>, <a class="lpdoc-idx-anchor" id="9" href="#set_env/2"><tt>set_env/2</tt></a>, <a class="lpdoc-idx-anchor" id="10" href="#del_env/1"><tt>del_env/1</tt></a>, <a class="lpdoc-idx-anchor" id="11" href="#current_env/2"><tt>current_env/2</tt></a>, <a class="lpdoc-idx-anchor" id="12" href="#extract_paths/2"><tt>extract_paths/2</tt></a>, <a class="lpdoc-idx-anchor" id="13" href="#current_host/1"><tt>current_host/1</tt></a>, <a class="lpdoc-idx-anchor" id="14" href="#current_executable/1"><tt>current_executable/1</tt></a>, <a class="lpdoc-idx-anchor" id="15" href="#umask/2"><tt>umask/2</tt></a>, <a class="lpdoc-idx-anchor" id="16" href="#working_directory/2"><tt>working_directory/2</tt></a>, <a class="lpdoc-idx-anchor" id="17" href="#cd/1"><tt>cd/1</tt></a>, <a class="lpdoc-idx-anchor" id="18" href="#directory_files/2"><tt>directory_files/2</tt></a>, <a class="lpdoc-idx-anchor" id="19" href="#mktemp/2"><tt>mktemp/2</tt></a>, <a class="lpdoc-idx-anchor" id="20" href="#mktemp_in_tmp/2"><tt>mktemp_in_tmp/2</tt></a>, <a class="lpdoc-idx-anchor" id="21" href="#file_exists/1"><tt>file_exists/1</tt></a>, <a class="lpdoc-idx-anchor" id="22" href="#file_exists/2"><tt>file_exists/2</tt></a>, <a class="lpdoc-idx-anchor" id="23" href="#file_property/2"><tt>file_property/2</tt></a>, <a class="lpdoc-idx-anchor" id="24" href="#file_properties/6"><tt>file_properties/6</tt></a>, <a class="lpdoc-idx-anchor" id="25" href="#modif_time/2"><tt>modif_time/2</tt></a>, <a class="lpdoc-idx-anchor" id="26" href="#modif_time0/2"><tt>modif_time0/2</tt></a>, <a class="lpdoc-idx-anchor" id="27" href="#touch/1"><tt>touch/1</tt></a>, <a class="lpdoc-idx-anchor" id="28" href="#fmode/2"><tt>fmode/2</tt></a>, <a class="lpdoc-idx-anchor" id="29" href="#chmod/2"><tt>chmod/2</tt></a>, <a class="lpdoc-idx-anchor" id="30" href="#chmod/3"><tt>chmod/3</tt></a>, <a class="lpdoc-idx-anchor" id="31" href="#set_exec_mode/2"><tt>set_exec_mode/2</tt></a>, <a class="lpdoc-idx-anchor" id="32" href="#delete_directory/1"><tt>delete_directory/1</tt></a>, <a class="lpdoc-idx-anchor" id="33" href="#delete_file/1"><tt>delete_file/1</tt></a>, <a class="lpdoc-idx-anchor" id="34" href="#rename_file/2"><tt>rename_file/2</tt></a>, <a class="lpdoc-idx-anchor" id="35" href="#make_directory/2"><tt>make_directory/2</tt></a>, <a class="lpdoc-idx-anchor" id="36" href="#make_directory/1"><tt>make_directory/1</tt></a>, <a class="lpdoc-idx-anchor" id="37" href="#system_error_report/1"><tt>system_error_report/1</tt></a>, <a class="lpdoc-idx-anchor" id="38" href="#get_tmp_dir/1"><tt>get_tmp_dir/1</tt></a>, <a class="lpdoc-idx-anchor" id="39" href="#dev_null/1"><tt>dev_null/1</tt></a>, <a class="lpdoc-idx-anchor" id="40" href="#pause/1"><tt>pause/1</tt></a>, <a class="lpdoc-idx-anchor" id="41" href="#wait/2"><tt>wait/2</tt></a>, <a class="lpdoc-idx-anchor" id="42" href="#kill/2"><tt>kill/2</tt></a>, <a class="lpdoc-idx-anchor" id="43" href="#get_pid/1"><tt>get_pid/1</tt></a>, <a class="lpdoc-idx-anchor" id="44" href="#get_uid/1"><tt>get_uid/1</tt></a>, <a class="lpdoc-idx-anchor" id="45" href="#get_gid/1"><tt>get_gid/1</tt></a>, <a class="lpdoc-idx-anchor" id="46" href="#get_pwnam/1"><tt>get_pwnam/1</tt></a>, <a class="lpdoc-idx-anchor" id="47" href="#get_grnam/1"><tt>get_grnam/1</tt></a>, <a class="lpdoc-idx-anchor" id="48" href="#get_numcores/1"><tt>get_numcores/1</tt></a>, <a class="lpdoc-idx-anchor" id="49" href="#shell/0"><tt>shell/0</tt></a>, <a class="lpdoc-idx-anchor" id="50" href="#shell/1"><tt>shell/1</tt></a>, <a class="lpdoc-idx-anchor" id="51" href="#shell/2"><tt>shell/2</tt></a>, <a class="lpdoc-idx-anchor" id="52" href="#system/1"><tt>system/1</tt></a>, <a class="lpdoc-idx-anchor" id="53" href="#system/2"><tt>system/2</tt></a>, <a class="lpdoc-idx-anchor" id="54" href="#fd_dup/2"><tt>fd_dup/2</tt></a>, <a class="lpdoc-idx-anchor" id="55" href="#fd_close/1"><tt>fd_close/1</tt></a>, <a class="lpdoc-idx-anchor" id="56" href="#winpath/3"><tt>winpath/3</tt></a>, <a class="lpdoc-idx-anchor" id="57" href="#winpath/2"><tt>winpath/2</tt></a>, <a class="lpdoc-idx-anchor" id="58" href="#winpath_c/3"><tt>winpath_c/3</tt></a>, <a class="lpdoc-idx-anchor" id="59" href="#cyg2win/3"><tt>cyg2win/3</tt></a>, <a class="lpdoc-idx-anchor" id="60" href="#no_swapslash/3"><tt>no_swapslash/3</tt></a>, <a class="lpdoc-idx-anchor" id="61" href="#cyg2win_a/3"><tt>cyg2win_a/3</tt></a>, <a class="lpdoc-idx-anchor" id="62" href="#using_windows/0"><tt>using_windows/0</tt></a>, <a class="lpdoc-idx-anchor" id="63" href="#get_home/1"><tt>get_home/1</tt></a>, <a class="lpdoc-idx-anchor" id="64" href="#find_executable/2"><tt>find_executable/2</tt></a>. <li><em>Regular Types:</em><br/><a class="lpdoc-idx-anchor" id="65" href="#datime_struct/1"><tt>datime_struct/1</tt></a>, <a class="lpdoc-idx-anchor" id="66" href="#copy_option/1"><tt>copy_option/1</tt></a>, <a class="lpdoc-idx-anchor" id="67" href="#copy_options/1"><tt>copy_options/1</tt></a>. </ul></ul></div></div><div id="Documentation on exports"><h2>Documentation on exports</h2><div><div class="lpdoc-defname"><span class="lpdoc-predtag">PREDICATE</span><a class="lpdoc-idx-anchor" id="now/1" href="ciaosearch.html#now/1">now/1</a></div><div class="lpdoc-deftext"><span class="lpdoc-usage-decl"><tt>now(Time)</tt> </span><p><span class="lpdoc-var">Time</span> is unified with the number of seconds elapsed since January, 1, 1970 (UTC).<p><span class="lpdoc-usage-header">Usage:</span><p></p><ul class="lpdoc-itemize-minus"><li><em>Calls should, and exit will be compatible with:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="68" href="basic_props.html#int/1"><tt>basic_props:int/1</tt></a>)</span><span><span class="lpdoc-var">Time</span> is an integer. </span> <li><em>The following properties hold upon exit:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="69" href="basic_props.html#int/1"><tt>basic_props:int/1</tt></a>)</span><span><span class="lpdoc-var">Time</span> is an integer. </span> </ul></div></div><p> <div><div class="lpdoc-defname"><span class="lpdoc-predtag">PREDICATE</span><a class="lpdoc-idx-anchor" id="datime/1" href="ciaosearch.html#datime/1">datime/1</a></div><div class="lpdoc-deftext"><span class="lpdoc-usage-decl"><tt>datime(Datime)</tt> </span><p><span class="lpdoc-var">Datime</span> is unified with a term of the form <tt>datime(Year,Month,Day,Hour,Minute,Second)</tt> which contains the current date and time.<p><span class="lpdoc-usage-header">Usage:</span><p></p><ul class="lpdoc-itemize-minus"><li><em>Call and exit should be compatible with:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="71" href="#datime_struct/1"><tt>system:datime_struct/1</tt></a>)</span><span><a class="lpdoc-idx-anchor" id="70" href="ciaosearch.html#datime_struct(Datime)"><tt>system:datime_struct(Datime)</tt></a> </span> <li><em>The following properties should hold upon exit:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="73" href="#datime_struct/1"><tt>system:datime_struct/1</tt></a>)</span><span><a class="lpdoc-idx-anchor" id="72" href="ciaosearch.html#datime_struct(Datime)"><tt>system:datime_struct(Datime)</tt></a> </span> </ul></div></div><p> <div><div class="lpdoc-defname"><span class="lpdoc-predtag">REGTYPE</span><a class="lpdoc-idx-anchor" id="datime_struct/1" href="ciaosearch.html#datime_struct/1">datime_struct/1</a></div><div class="lpdoc-deftext">A regular type, defined as follows:<pre class="lpdoc-codeblock">datime_struct(datime(Year,Month,Day,Hour,Min,Sec)) :- int(Year), int(Month), int(Day), int(Hour), int(Min), int(Sec). </pre> </div></div><p> <div><div class="lpdoc-defname"><span class="lpdoc-predtag">PREDICATE</span><a class="lpdoc-idx-anchor" id="datime/9" href="ciaosearch.html#datime/9">datime/9</a></div><div class="lpdoc-deftext"><span class="lpdoc-usage-decl"><tt>datime(Time,Year,Month,Day,Hour,Min,Sec,WeekDay,YearDay)</tt> </span><p><span class="lpdoc-var">Time</span> is as in <a class="lpdoc-idx-anchor" id="74" href="#now/1"><tt>now/1</tt></a>. <span class="lpdoc-var">WeekDay</span> is the number of days since Sunday, in the range 0 to 6. <span class="lpdoc-var">YearDay</span> is the number of days since January 1, in the range 0 to 365.<p><span class="lpdoc-usage-header">Usage 1:</span><p>If <span class="lpdoc-var">Time</span> is given, the rest of the arguments are unified with the date and time to which the <span class="lpdoc-var">Time</span> argument refers.</p><ul class="lpdoc-itemize-minus"><li><em>Calls should, and exit will be compatible with:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="75" href="basic_props.html#int/1"><tt>basic_props:int/1</tt></a>)</span><span><span class="lpdoc-var">Year</span> is an integer. </span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="76" href="basic_props.html#int/1"><tt>basic_props:int/1</tt></a>)</span><span><span class="lpdoc-var">Month</span> is an integer. </span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="77" href="basic_props.html#int/1"><tt>basic_props:int/1</tt></a>)</span><span><span class="lpdoc-var">Day</span> is an integer. </span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="78" href="basic_props.html#int/1"><tt>basic_props:int/1</tt></a>)</span><span><span class="lpdoc-var">Hour</span> is an integer. </span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="79" href="basic_props.html#int/1"><tt>basic_props:int/1</tt></a>)</span><span><span class="lpdoc-var">Min</span> is an integer. </span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="80" href="basic_props.html#int/1"><tt>basic_props:int/1</tt></a>)</span><span><span class="lpdoc-var">Sec</span> is an integer. </span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="81" href="basic_props.html#int/1"><tt>basic_props:int/1</tt></a>)</span><span><span class="lpdoc-var">WeekDay</span> is an integer. </span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="82" href="basic_props.html#int/1"><tt>basic_props:int/1</tt></a>)</span><span><span class="lpdoc-var">YearDay</span> is an integer. </span> <li><em>The following properties should hold at call time:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="83" href="basic_props.html#int/1"><tt>basic_props:int/1</tt></a>)</span><span><span class="lpdoc-var">Time</span> is an integer. </span> <li><em>The following properties hold upon exit:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="84" href="basic_props.html#int/1"><tt>basic_props:int/1</tt></a>)</span><span><span class="lpdoc-var">Year</span> is an integer. </span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="85" href="basic_props.html#int/1"><tt>basic_props:int/1</tt></a>)</span><span><span class="lpdoc-var">Month</span> is an integer. </span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="86" href="basic_props.html#int/1"><tt>basic_props:int/1</tt></a>)</span><span><span class="lpdoc-var">Day</span> is an integer. </span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="87" href="basic_props.html#int/1"><tt>basic_props:int/1</tt></a>)</span><span><span class="lpdoc-var">Hour</span> is an integer. </span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="88" href="basic_props.html#int/1"><tt>basic_props:int/1</tt></a>)</span><span><span class="lpdoc-var">Min</span> is an integer. </span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="89" href="basic_props.html#int/1"><tt>basic_props:int/1</tt></a>)</span><span><span class="lpdoc-var">Sec</span> is an integer. </span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="90" href="basic_props.html#int/1"><tt>basic_props:int/1</tt></a>)</span><span><span class="lpdoc-var">WeekDay</span> is an integer. </span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="91" href="basic_props.html#int/1"><tt>basic_props:int/1</tt></a>)</span><span><span class="lpdoc-var">YearDay</span> is an integer. </span> </ul><p><span class="lpdoc-usage-header">Usage 2:</span><p>Bound <span class="lpdoc-var">Time</span>, <span class="lpdoc-var">WeekDay</span> and <span class="lpdoc-var">YearDay</span> as determined by the input arguments.</p><ul class="lpdoc-itemize-minus"><li><em>Calls should, and exit will be compatible with:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="92" href="basic_props.html#int/1"><tt>basic_props:int/1</tt></a>)</span><span><span class="lpdoc-var">Time</span> is an integer. </span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="93" href="basic_props.html#int/1"><tt>basic_props:int/1</tt></a>)</span><span><span class="lpdoc-var">WeekDay</span> is an integer. </span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="94" href="basic_props.html#int/1"><tt>basic_props:int/1</tt></a>)</span><span><span class="lpdoc-var">YearDay</span> is an integer. </span> <li><em>The following properties should hold at call time:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="95" href="basic_props.html#int/1"><tt>basic_props:int/1</tt></a>)</span><span><span class="lpdoc-var">Year</span> is an integer. </span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="96" href="basic_props.html#int/1"><tt>basic_props:int/1</tt></a>)</span><span><span class="lpdoc-var">Month</span> is an integer. </span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="97" href="basic_props.html#int/1"><tt>basic_props:int/1</tt></a>)</span><span><span class="lpdoc-var">Day</span> is an integer. </span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="98" href="basic_props.html#int/1"><tt>basic_props:int/1</tt></a>)</span><span><span class="lpdoc-var">Hour</span> is an integer. </span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="99" href="basic_props.html#int/1"><tt>basic_props:int/1</tt></a>)</span><span><span class="lpdoc-var">Min</span> is an integer. </span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="100" href="basic_props.html#int/1"><tt>basic_props:int/1</tt></a>)</span><span><span class="lpdoc-var">Sec</span> is an integer. </span> <li><em>The following properties hold upon exit:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="101" href="basic_props.html#int/1"><tt>basic_props:int/1</tt></a>)</span><span><span class="lpdoc-var">Time</span> is an integer. </span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="102" href="basic_props.html#int/1"><tt>basic_props:int/1</tt></a>)</span><span><span class="lpdoc-var">WeekDay</span> is an integer. </span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="103" href="basic_props.html#int/1"><tt>basic_props:int/1</tt></a>)</span><span><span class="lpdoc-var">YearDay</span> is an integer. </span> </ul><p><span class="lpdoc-usage-header">Usage 3:</span><p>Bound <span class="lpdoc-var">Time</span> to current time and the rest of the arguments refer to current time.</p><ul class="lpdoc-itemize-minus"><li><em>Calls should, and exit will be compatible with:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="104" href="basic_props.html#int/1"><tt>basic_props:int/1</tt></a>)</span><span><span class="lpdoc-var">WeekDay</span> is an integer. </span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="105" href="basic_props.html#int/1"><tt>basic_props:int/1</tt></a>)</span><span><span class="lpdoc-var">YearDay</span> is an integer. </span> <li><em>The following properties should hold at call time:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="106" href="term_typing.html#var/1"><tt>term_typing:var/1</tt></a>)</span><span><span class="lpdoc-var">Time</span> is a free variable. </span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="107" href="term_typing.html#var/1"><tt>term_typing:var/1</tt></a>)</span><span><span class="lpdoc-var">Year</span> is a free variable. </span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="108" href="term_typing.html#var/1"><tt>term_typing:var/1</tt></a>)</span><span><span class="lpdoc-var">Month</span> is a free variable. </span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="109" href="term_typing.html#var/1"><tt>term_typing:var/1</tt></a>)</span><span><span class="lpdoc-var">Day</span> is a free variable. </span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="110" href="term_typing.html#var/1"><tt>term_typing:var/1</tt></a>)</span><span><span class="lpdoc-var">Hour</span> is a free variable. </span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="111" href="term_typing.html#var/1"><tt>term_typing:var/1</tt></a>)</span><span><span class="lpdoc-var">Min</span> is a free variable. </span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="112" href="term_typing.html#var/1"><tt>term_typing:var/1</tt></a>)</span><span><span class="lpdoc-var">Sec</span> is a free variable. </span> <li><em>The following properties hold upon exit:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="113" href="basic_props.html#int/1"><tt>basic_props:int/1</tt></a>)</span><span><span class="lpdoc-var">Time</span> is an integer. </span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="114" href="basic_props.html#int/1"><tt>basic_props:int/1</tt></a>)</span><span><span class="lpdoc-var">Year</span> is an integer. </span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="115" href="basic_props.html#int/1"><tt>basic_props:int/1</tt></a>)</span><span><span class="lpdoc-var">Month</span> is an integer. </span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="116" href="basic_props.html#int/1"><tt>basic_props:int/1</tt></a>)</span><span><span class="lpdoc-var">Day</span> is an integer. </span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="117" href="basic_props.html#int/1"><tt>basic_props:int/1</tt></a>)</span><span><span class="lpdoc-var">Hour</span> is an integer. </span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="118" href="basic_props.html#int/1"><tt>basic_props:int/1</tt></a>)</span><span><span class="lpdoc-var">Min</span> is an integer. </span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="119" href="basic_props.html#int/1"><tt>basic_props:int/1</tt></a>)</span><span><span class="lpdoc-var">Sec</span> is an integer. </span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="120" href="basic_props.html#int/1"><tt>basic_props:int/1</tt></a>)</span><span><span class="lpdoc-var">WeekDay</span> is an integer. </span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="121" href="basic_props.html#int/1"><tt>basic_props:int/1</tt></a>)</span><span><span class="lpdoc-var">YearDay</span> is an integer. </span> </ul></div></div><p> <div><div class="lpdoc-defname"><span class="lpdoc-predtag">REGTYPE</span><a class="lpdoc-idx-anchor" id="copy_option/1" href="ciaosearch.html#copy_option/1">copy_option/1</a></div><div class="lpdoc-deftext"><p><span class="lpdoc-usage-header">Usage:</span><span class="lpdoc-usage-decl"><tt>copy_option(Opt)</tt> </span><p><span class="lpdoc-var">Opt</span> is a file copy option. <pre class="lpdoc-codeblock">copy_option(overwrite). copy_option(timestamp). copy_option(symlink). copy_option(append). </pre></p><ul class="lpdoc-itemize-minus"></ul></div></div><p> <div><div class="lpdoc-defname"><span class="lpdoc-predtag">REGTYPE</span><a class="lpdoc-idx-anchor" id="copy_options/1" href="ciaosearch.html#copy_options/1">copy_options/1</a></div><div class="lpdoc-deftext"><p><span class="lpdoc-usage-header">Usage:</span><span class="lpdoc-usage-decl"><tt>copy_options(Opts)</tt> </span><p><span class="lpdoc-var">Opts</span> is a list of file copy options.</p><ul class="lpdoc-itemize-minus"></ul></div></div><p> <div><div class="lpdoc-defname"><span class="lpdoc-predtag">PREDICATE</span><a class="lpdoc-idx-anchor" id="copy_file/2" href="ciaosearch.html#copy_file/2">copy_file/2</a></div><div class="lpdoc-deftext"><span class="lpdoc-usage-decl"><tt>copy_file(Source,Destination)</tt> </span><p>Copies the file <span class="lpdoc-var">Source</span> to <span class="lpdoc-var">Destination</span>.<p><span class="lpdoc-usage-header">Usage:</span><p></p><ul class="lpdoc-itemize-minus"><li><em>The following properties should hold at call time:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="122" href="basic_props.html#atm/1"><tt>basic_props:atm/1</tt></a>)</span><span><span class="lpdoc-var">Source</span> is an atom. </span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="123" href="basic_props.html#atm/1"><tt>basic_props:atm/1</tt></a>)</span><span><span class="lpdoc-var">Destination</span> is an atom. </span> </ul></div></div><p> <div><div class="lpdoc-defname"><span class="lpdoc-predtag">PREDICATE</span><a class="lpdoc-idx-anchor" id="copy_file/3" href="ciaosearch.html#copy_file/3">copy_file/3</a></div><div class="lpdoc-deftext"><p><span class="lpdoc-usage-header">Usage:</span><p></p><ul class="lpdoc-itemize-minus"><li><em>The following properties should hold at call time:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="124" href="basic_props.html#atm/1"><tt>basic_props:atm/1</tt></a>)</span><span><span class="lpdoc-var">Arg1</span> is an atom. </span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="125" href="basic_props.html#atm/1"><tt>basic_props:atm/1</tt></a>)</span><span><span class="lpdoc-var">Arg2</span> is an atom. </span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="126" href="#copy_options/1"><tt>system:copy_options/1</tt></a>)</span><span><span class="lpdoc-var">Arg3</span> is a list of file copy options. </span> </ul></div></div><p> <div><div class="lpdoc-defname"><span class="lpdoc-predtag">PREDICATE</span><a class="lpdoc-idx-anchor" id="getenvstr/2" href="ciaosearch.html#getenvstr/2">getenvstr/2</a></div><div class="lpdoc-deftext"><span class="lpdoc-usage-decl"><tt>getenvstr(Name,Value)</tt> </span><p>The environment variable <span class="lpdoc-var">Name</span> has <span class="lpdoc-var">Value</span>. Fails if variable <span class="lpdoc-var">Name</span> is not defined.<p><span class="lpdoc-usage-header">Usage:</span><p></p><ul class="lpdoc-itemize-minus"><li><em>Call and exit should be compatible with:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="127" href="basic_props.html#string/1"><tt>basic_props:string/1</tt></a>)</span><span><span class="lpdoc-var">Value</span> is a string (a list of character codes). </span> <li><em>The following properties should hold at call time:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="128" href="basic_props.html#atm/1"><tt>basic_props:atm/1</tt></a>)</span><span><span class="lpdoc-var">Name</span> is an atom. </span> <li><em>The following properties should hold upon exit:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="129" href="basic_props.html#string/1"><tt>basic_props:string/1</tt></a>)</span><span><span class="lpdoc-var">Value</span> is a string (a list of character codes). </span> </ul></div></div><p> <div><div class="lpdoc-defname"><span class="lpdoc-predtag">PREDICATE</span><a class="lpdoc-idx-anchor" id="setenvstr/2" href="ciaosearch.html#setenvstr/2">setenvstr/2</a></div><div class="lpdoc-deftext"><span class="lpdoc-usage-decl"><tt>setenvstr(Name,Value)</tt> </span><p>The environment variable <span class="lpdoc-var">Name</span> is assigned <span class="lpdoc-var">Value</span>.<p><span class="lpdoc-usage-header">Usage:</span><p></p><ul class="lpdoc-itemize-minus"><li><em>The following properties should hold at call time:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="130" href="basic_props.html#atm/1"><tt>basic_props:atm/1</tt></a>)</span><span><span class="lpdoc-var">Name</span> is an atom. </span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="131" href="basic_props.html#string/1"><tt>basic_props:string/1</tt></a>)</span><span><span class="lpdoc-var">Value</span> is a string (a list of character codes). </span> </ul></div></div><p> <div><div class="lpdoc-defname"><span class="lpdoc-predtag">PREDICATE</span><a class="lpdoc-idx-anchor" id="set_env/2" href="ciaosearch.html#set_env/2">set_env/2</a></div><div class="lpdoc-deftext"><span class="lpdoc-usage-decl"><tt>set_env(Name,Value)</tt> </span><p>The environment variable <span class="lpdoc-var">Name</span> is assigned <span class="lpdoc-var">Value</span>.<p><span class="lpdoc-usage-header">Usage:</span><p></p><ul class="lpdoc-itemize-minus"><li><em>The following properties should hold at call time:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="132" href="basic_props.html#atm/1"><tt>basic_props:atm/1</tt></a>)</span><span><span class="lpdoc-var">Name</span> is an atom. </span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="133" href="basic_props.html#atm/1"><tt>basic_props:atm/1</tt></a>)</span><span><span class="lpdoc-var">Value</span> is an atom. </span> </ul></div></div><p> <div><div class="lpdoc-defname"><span class="lpdoc-predtag">PREDICATE</span><a class="lpdoc-idx-anchor" id="del_env/1" href="ciaosearch.html#del_env/1">del_env/1</a></div><div class="lpdoc-deftext"><span class="lpdoc-usage-decl"><tt>del_env(Name)</tt> </span><p>The environment variable <span class="lpdoc-var">Name</span> is removed.<p><span class="lpdoc-usage-header">Usage:</span><p></p><ul class="lpdoc-itemize-minus"><li><em>The following properties should hold at call time:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="134" href="basic_props.html#atm/1"><tt>basic_props:atm/1</tt></a>)</span><span><span class="lpdoc-var">Name</span> is an atom. </span> </ul></div></div><p> <div><div class="lpdoc-defname"><span class="lpdoc-predtag">PREDICATE</span><a class="lpdoc-idx-anchor" id="current_env/2" href="ciaosearch.html#current_env/2">current_env/2</a></div><div class="lpdoc-deftext"><span class="lpdoc-usage-decl"><tt>current_env(Name,Value)</tt> </span><p>If <span class="lpdoc-var">Name</span> is an atom, then unifies the environment variable <span class="lpdoc-var">Name</span> with its value. Note that this predicate can be used to enumerate all the environment variables using backtracking.<p><span class="lpdoc-usage-header">Usage:</span><p></p><ul class="lpdoc-itemize-minus"><li><em>Call and exit should be compatible with:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="135" href="basic_props.html#atm/1"><tt>basic_props:atm/1</tt></a>)</span><span><span class="lpdoc-var">Name</span> is an atom. </span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="136" href="basic_props.html#atm/1"><tt>basic_props:atm/1</tt></a>)</span><span><span class="lpdoc-var">Value</span> is an atom. </span> <li><em>The following properties should hold upon exit:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="137" href="basic_props.html#atm/1"><tt>basic_props:atm/1</tt></a>)</span><span><span class="lpdoc-var">Name</span> is an atom. </span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="138" href="basic_props.html#atm/1"><tt>basic_props:atm/1</tt></a>)</span><span><span class="lpdoc-var">Value</span> is an atom. </span> </ul></div></div><p> <div><div class="lpdoc-defname"><span class="lpdoc-predtag">PREDICATE</span><a class="lpdoc-idx-anchor" id="extract_paths/2" href="ciaosearch.html#extract_paths/2">extract_paths/2</a></div><div class="lpdoc-deftext"><span class="lpdoc-usage-decl"><tt>extract_paths(PathList,Paths)</tt> </span><p>Split <span class="lpdoc-var">PathList</span> atom into the list of paths <span class="lpdoc-var">Paths</span>. Paths in <span class="lpdoc-var">String</span> are separated by the <a class="lpdoc-idx-anchor" id="139" href="ciaosearch.html#path list separator character">path list separator character</a> (colons in POSIX-like systems, semicolons in Windows). Empty paths are removed from <span class="lpdoc-var">Paths</span>. <span class="lpdoc-var">Paths</span> is empty if <span class="lpdoc-var">PathList</span> is the empty atom.<p><span class="lpdoc-usage-header">Usage:</span><p></p><ul class="lpdoc-itemize-minus"><li><em>Calls should, and exit will be compatible with:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="140" href="basic_props.html#list/2"><tt>basic_props:list/2</tt></a>)</span><span><span class="lpdoc-var">Paths</span> is a list of <span class="lpdoc-var">atm</span>s. </span> <li><em>The following properties should hold at call time:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="141" href="basic_props.html#atm/1"><tt>basic_props:atm/1</tt></a>)</span><span><span class="lpdoc-var">PathList</span> is an atom. </span> <li><em>The following properties hold upon exit:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="142" href="basic_props.html#list/2"><tt>basic_props:list/2</tt></a>)</span><span><span class="lpdoc-var">Paths</span> is a list of <span class="lpdoc-var">atm</span>s. </span> </ul></div></div><p> <div><div class="lpdoc-defname"><span class="lpdoc-predtag">PREDICATE</span><a class="lpdoc-idx-anchor" id="current_host/1" href="ciaosearch.html#current_host/1">current_host/1</a></div><div class="lpdoc-deftext"><span class="lpdoc-usage-decl"><tt>current_host(Hostname)</tt> </span><p><span class="lpdoc-var">Hostname</span> is unified with the fully qualified name of the host.<p><span class="lpdoc-usage-header">Usage:</span><p></p><ul class="lpdoc-itemize-minus"><li><em>Calls should, and exit will be compatible with:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="143" href="basic_props.html#atm/1"><tt>basic_props:atm/1</tt></a>)</span><span><span class="lpdoc-var">Hostname</span> is an atom. </span> <li><em>The following properties hold upon exit:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="144" href="basic_props.html#atm/1"><tt>basic_props:atm/1</tt></a>)</span><span><span class="lpdoc-var">Hostname</span> is an atom. </span> </ul></div></div><p> <div><div class="lpdoc-defname"><span class="lpdoc-predtag">PREDICATE</span><a class="lpdoc-idx-anchor" id="current_executable/1" href="ciaosearch.html#current_executable/1">current_executable/1</a></div><div class="lpdoc-deftext"><span class="lpdoc-usage-decl"><tt>current_executable(Path)</tt> </span><p>Unifies <span class="lpdoc-var">Path</span> with the path to the current Ciao executable (which may be a standalone binary or bytecode executable)<p><span class="lpdoc-usage-header">Usage:</span><p></p><ul class="lpdoc-itemize-minus"><li><em>Calls should, and exit will be compatible with:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="145" href="basic_props.html#atm/1"><tt>basic_props:atm/1</tt></a>)</span><span><span class="lpdoc-var">Path</span> is an atom. </span> <li><em>The following properties hold upon exit:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="146" href="basic_props.html#atm/1"><tt>basic_props:atm/1</tt></a>)</span><span><span class="lpdoc-var">Path</span> is an atom. </span> </ul></div></div><p> <div><div class="lpdoc-defname"><span class="lpdoc-predtag">PREDICATE</span><a class="lpdoc-idx-anchor" id="umask/2" href="ciaosearch.html#umask/2">umask/2</a></div><div class="lpdoc-deftext"><p><span class="lpdoc-usage-header">Usage 1:</span><span class="lpdoc-usage-decl"><tt>umask(OldMask,NewMask)</tt> </span><p>The process file creation mask was <span class="lpdoc-var">OldMask</span>, and it is changed to <span class="lpdoc-var">NewMask</span>.</p><ul class="lpdoc-itemize-minus"><li><em>The following properties should hold at call time:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="147" href="basic_props.html#int/1"><tt>basic_props:int/1</tt></a>)</span><span><span class="lpdoc-var">NewMask</span> is an integer. </span> <li><em>The following properties hold upon exit:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="148" href="basic_props.html#int/1"><tt>basic_props:int/1</tt></a>)</span><span><span class="lpdoc-var">OldMask</span> is an integer. </span> </ul><p><span class="lpdoc-usage-header">Usage 2:</span><span class="lpdoc-usage-decl"><tt>umask(OldMask,NewMask)</tt> </span><p>Gets the process file creation mask without changing it.</p><ul class="lpdoc-itemize-minus"><li><em>The following properties should hold at call time:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="149" href="term_typing.html#var/1"><tt>term_typing:var/1</tt></a>)</span><span><span class="lpdoc-var">OldMask</span> is a free variable. </span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="150" href="term_typing.html#var/1"><tt>term_typing:var/1</tt></a>)</span><span><span class="lpdoc-var">NewMask</span> is a free variable. </span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="151" href="ciaosearch.html#== /2"><tt>term_compare:== /2</tt></a>)</span><span>The terms <span class="lpdoc-var">OldMask</span> and <span class="lpdoc-var">NewMask</span> are strictly identical. </span> <li><em>The following properties hold upon exit:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="152" href="basic_props.html#int/1"><tt>basic_props:int/1</tt></a>)</span><span><span class="lpdoc-var">OldMask</span> is an integer. </span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="153" href="basic_props.html#int/1"><tt>basic_props:int/1</tt></a>)</span><span><span class="lpdoc-var">NewMask</span> is an integer. </span> </ul></div></div><p> <div><div class="lpdoc-defname"><span class="lpdoc-predtag">PREDICATE</span><a class="lpdoc-idx-anchor" id="working_directory/2" href="ciaosearch.html#working_directory/2">working_directory/2</a></div><div class="lpdoc-deftext"><span class="lpdoc-usage-decl"><tt>working_directory(OldDir,NewDir)</tt> </span><p>Unifies current working directory with <span class="lpdoc-var">OldDir</span>, and then changes the working directory to <span class="lpdoc-var">NewDir</span>. Calling <tt>working_directory(Dir,Dir)</tt> simply unifies <tt>Dir</tt> with the current working directory without changing anything else.<p><span class="lpdoc-usage-header">Usage 1:</span><p>Changes current working directory.</p><ul class="lpdoc-itemize-minus"><li><em>Calls should, and exit will be compatible with:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="154" href="basic_props.html#atm/1"><tt>basic_props:atm/1</tt></a>)</span><span><span class="lpdoc-var">OldDir</span> is an atom. </span> <li><em>The following properties should hold at call time:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="155" href="basic_props.html#atm/1"><tt>basic_props:atm/1</tt></a>)</span><span><span class="lpdoc-var">NewDir</span> is an atom. </span> <li><em>The following properties hold upon exit:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="156" href="basic_props.html#atm/1"><tt>basic_props:atm/1</tt></a>)</span><span><span class="lpdoc-var">OldDir</span> is an atom. </span> </ul><p><span class="lpdoc-usage-header">Usage 2:</span><span class="lpdoc-usage-decl"><tt>working_directory(OldDir,NewDir)</tt> </span><p>Gets current working directory.</p><ul class="lpdoc-itemize-minus"><li><em>The following properties should hold at call time:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="157" href="term_typing.html#var/1"><tt>term_typing:var/1</tt></a>)</span><span><span class="lpdoc-var">OldDir</span> is a free variable. </span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="158" href="term_typing.html#var/1"><tt>term_typing:var/1</tt></a>)</span><span><span class="lpdoc-var">NewDir</span> is a free variable. </span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="159" href="ciaosearch.html#== /2"><tt>term_compare:== /2</tt></a>)</span><span>The terms <span class="lpdoc-var">OldDir</span> and <span class="lpdoc-var">NewDir</span> are strictly identical. </span> <li><em>The following properties hold upon exit:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="160" href="basic_props.html#atm/1"><tt>basic_props:atm/1</tt></a>)</span><span><span class="lpdoc-var">OldDir</span> is an atom. </span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="161" href="basic_props.html#atm/1"><tt>basic_props:atm/1</tt></a>)</span><span><span class="lpdoc-var">NewDir</span> is an atom. </span> </ul></div></div><p> <div><div class="lpdoc-defname"><span class="lpdoc-predtag">PREDICATE</span><a class="lpdoc-idx-anchor" id="cd/1" href="ciaosearch.html#cd/1">cd/1</a></div><div class="lpdoc-deftext"><span class="lpdoc-usage-decl"><tt>cd(Path)</tt> </span><p>Changes working directory to <span class="lpdoc-var">Path</span>.<p><span class="lpdoc-usage-header">Usage:</span><p></p><ul class="lpdoc-itemize-minus"><li><em>The following properties should hold at call time:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="162" href="basic_props.html#atm/1"><tt>basic_props:atm/1</tt></a>)</span><span><span class="lpdoc-var">Path</span> is an atom. </span> </ul></div></div><p> <div><div class="lpdoc-defname"><span class="lpdoc-predtag">PREDICATE</span><a class="lpdoc-idx-anchor" id="directory_files/2" href="ciaosearch.html#directory_files/2">directory_files/2</a></div><div class="lpdoc-deftext"><span class="lpdoc-usage-decl"><tt>directory_files(Directory,FileList)</tt> </span><p><span class="lpdoc-var">FileList</span> is the unordered list of entries (files, directories, etc.) in <span class="lpdoc-var">Directory</span>.<p><span class="lpdoc-usage-header">Usage:</span><p></p><ul class="lpdoc-itemize-minus"><li><em>Calls should, and exit will be compatible with:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="163" href="basic_props.html#list/2"><tt>basic_props:list/2</tt></a>)</span><span><span class="lpdoc-var">FileList</span> is a list of <span class="lpdoc-var">atm</span>s. </span> <li><em>The following properties should hold at call time:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="164" href="basic_props.html#atm/1"><tt>basic_props:atm/1</tt></a>)</span><span><span class="lpdoc-var">Directory</span> is an atom. </span> <li><em>The following properties hold upon exit:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="165" href="basic_props.html#list/2"><tt>basic_props:list/2</tt></a>)</span><span><span class="lpdoc-var">FileList</span> is a list of <span class="lpdoc-var">atm</span>s. </span> </ul></div></div><p> <div><div class="lpdoc-defname"><span class="lpdoc-predtag">PREDICATE</span><a class="lpdoc-idx-anchor" id="mktemp/2" href="ciaosearch.html#mktemp/2">mktemp/2</a></div><div class="lpdoc-deftext"><span class="lpdoc-usage-decl"><tt>mktemp(Template,Filename)</tt> </span><p>Returns a unique <span class="lpdoc-var">Filename</span> based on <span class="lpdoc-var">Template</span>: <span class="lpdoc-var">Template</span> must be a valid file name with six trailing X, which are substituted to create a new file name. <span class="lpdoc-var">Filename</span> is created in read/write mode but closed immediately after creation.<p><span class="lpdoc-usage-header">Usage:</span><p></p><ul class="lpdoc-itemize-minus"><li><em>Calls should, and exit will be compatible with:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="166" href="basic_props.html#atm/1"><tt>basic_props:atm/1</tt></a>)</span><span><span class="lpdoc-var">Filename</span> is an atom. </span> <li><em>The following properties should hold at call time:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="167" href="basic_props.html#atm/1"><tt>basic_props:atm/1</tt></a>)</span><span><span class="lpdoc-var">Template</span> is an atom. </span> <li><em>The following properties hold upon exit:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="168" href="basic_props.html#atm/1"><tt>basic_props:atm/1</tt></a>)</span><span><span class="lpdoc-var">Filename</span> is an atom. </span> </ul></div></div><p> <div><div class="lpdoc-defname"><span class="lpdoc-predtag">PREDICATE</span><a class="lpdoc-idx-anchor" id="mktemp_in_tmp/2" href="ciaosearch.html#mktemp_in_tmp/2">mktemp_in_tmp/2</a></div><div class="lpdoc-deftext">No further documentation available for this predicate.</div></div><p> <div><div class="lpdoc-defname"><span class="lpdoc-predtag">PREDICATE</span><a class="lpdoc-idx-anchor" id="file_exists/1" href="ciaosearch.html#file_exists/1">file_exists/1</a></div><div class="lpdoc-deftext"><span class="lpdoc-usage-decl"><tt>file_exists(File)</tt> </span><p>Succeeds if <span class="lpdoc-var">File</span> (a file or directory) exists (and is accessible).<p><span class="lpdoc-usage-header">Usage:</span><p></p><ul class="lpdoc-itemize-minus"><li><em>The following properties should hold at call time:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="169" href="basic_props.html#atm/1"><tt>basic_props:atm/1</tt></a>)</span><span><span class="lpdoc-var">File</span> is an atom. </span> </ul></div></div><p> <div><div class="lpdoc-defname"><span class="lpdoc-predtag">PREDICATE</span><a class="lpdoc-idx-anchor" id="file_exists/2" href="ciaosearch.html#file_exists/2">file_exists/2</a></div><div class="lpdoc-deftext"><span class="lpdoc-usage-decl"><tt>file_exists(File,Mode)</tt> </span><p><span class="lpdoc-var">File</span> (a file or directory) exists and it is accessible with <span class="lpdoc-var">Mode</span>, as in the Unix call <tt>access(2)</tt>. Typically, <span class="lpdoc-var">Mode</span> is 4 for read permission, 2 for write permission and 1 for execute permission.<p><span class="lpdoc-usage-header">Usage:</span><p></p><ul class="lpdoc-itemize-minus"><li><em>The following properties should hold at call time:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="170" href="basic_props.html#atm/1"><tt>basic_props:atm/1</tt></a>)</span><span><span class="lpdoc-var">File</span> is an atom. </span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="171" href="basic_props.html#int/1"><tt>basic_props:int/1</tt></a>)</span><span><span class="lpdoc-var">Mode</span> is an integer. </span> <li><em>The following properties hold upon exit:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="172" href="basic_props.html#atm/1"><tt>basic_props:atm/1</tt></a>)</span><span><span class="lpdoc-var">File</span> is an atom. </span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="173" href="basic_props.html#int/1"><tt>basic_props:int/1</tt></a>)</span><span><span class="lpdoc-var">Mode</span> is an integer. </span> </ul></div></div><p> <div><div class="lpdoc-defname"><span class="lpdoc-predtag">PREDICATE</span><a class="lpdoc-idx-anchor" id="file_property/2" href="ciaosearch.html#file_property/2">file_property/2</a></div><div class="lpdoc-deftext"><span class="lpdoc-usage-decl"><tt>file_property(File,Property)</tt> </span><p><span class="lpdoc-var">File</span> has the property <span class="lpdoc-var">Property</span>. The possible properties are:<p><dl> <p><dt>type(<span class="lpdoc-var">Type</span>)<dd> <span class="lpdoc-var">Type</span> is one of <tt>regular</tt>, <tt>directory</tt>, <tt>fifo</tt>, <tt>socket</tt> or <tt>unknown</tt>.<p><dt>linkto(<span class="lpdoc-var">Linkto</span>)<dd> If <span class="lpdoc-var">File</span> is a symbolic link, <span class="lpdoc-var">Linkto</span> is the file pointed to by the link (and the other properties come from that file, not from the link itself).<p><dt>mod_time(<span class="lpdoc-var">ModTime</span>)<dd> <span class="lpdoc-var">ModTime</span> is the time of last modification (seconds since January, 1, 1970).<p><dt>mode(<span class="lpdoc-var">Protection</span>)<dd> <span class="lpdoc-var">Protection</span> is the protection mode.<p><dt>size(<span class="lpdoc-var">Size</span>)<dd> <span class="lpdoc-var">Size</span> is the size.<p></dl> <p>If <span class="lpdoc-var">Property</span> is uninstantiated, the predicate will enumerate the properties on backtracking.<p><span class="lpdoc-usage-header">Usage:</span><p></p><ul class="lpdoc-itemize-minus"><li><em>Call and exit should be compatible with:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="174" href="basic_props.html#struct/1"><tt>basic_props:struct/1</tt></a>)</span><span><span class="lpdoc-var">Property</span> is a compound term. </span> <li><em>The following properties should hold at call time:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="175" href="basic_props.html#atm/1"><tt>basic_props:atm/1</tt></a>)</span><span><span class="lpdoc-var">File</span> is an atom. </span> <li><em>The following properties should hold upon exit:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="176" href="basic_props.html#struct/1"><tt>basic_props:struct/1</tt></a>)</span><span><span class="lpdoc-var">Property</span> is a compound term. </span> </ul></div></div><p> <div><div class="lpdoc-defname"><span class="lpdoc-predtag">PREDICATE</span><a class="lpdoc-idx-anchor" id="file_properties/6" href="ciaosearch.html#file_properties/6">file_properties/6</a></div><div class="lpdoc-deftext"><span class="lpdoc-usage-decl"><tt>file_properties(Path,Type,Linkto,Time,Protection,Size)</tt> </span><p>The file <span class="lpdoc-var">Path</span> has the following properties:<p><ul> <p><li>File type <span class="lpdoc-var">Type</span> (one of <tt>regular</tt>, <tt>directory</tt>, <tt>fifo</tt>, <tt>socket</tt> or <tt>unknown</tt>).<p><li>If <span class="lpdoc-var">Path</span> is a symbolic link, <span class="lpdoc-var">Linkto</span> is the file pointed to. All other properties come from the file pointed, not the link. <span class="lpdoc-var">Linkto</span> is &apos;&apos; if <span class="lpdoc-var">Path</span> is not a symbolic link.<p>