<HTML> <HEAD> <!-- Created by texi2html 1.56k + clip patches and <A href="http://www.clip.dia.fi.upm.es/Software">lpdoc</A> from ciao.texi on 28 January 2007 --> <LINK rel="stylesheet" href="ciao.css" type="text/css"> <TITLE>The Ciao Prolog System - File locks</TITLE> </HEAD> <BODY> Go to the <A HREF="ciao_1.html">first</A>, <A HREF="ciao_78.html">previous</A>, <A HREF="ciao_80.html">next</A>, <A HREF="ciao_241.html">last</A> section, <A HREF="ciao_toc.html">table of contents</A>. <P><HR><P> <H1><A NAME="SEC338" HREF="ciao_toc.html#TOC338">File locks</A></H1> <P> <A NAME="IDX4572"></A> <P> <STRONG>Author(s):</STRONG> J. Gomez, D. Cabeza, M. Carro. <P> <STRONG>Version:</STRONG> 1.10#7 (2006/4/26, 19:22:13 CEST) <P> <STRONG>Version of last change:</STRONG> 1.7#159 (2001/11/27, 11:58:24 CET) <P> This module implements file locks: the ability to lock a fiel so that other processes cannot access it until the file is unlocked. <STRONG>It is, however, not working.</STRONG> The predicates do nothing. Proper implementation is planned for a near future. <UL> <LI><A HREF="ciao_79.html#SEC339">Usage and interface (file_locks)</A> <LI><A HREF="ciao_79.html#SEC340">Documentation on exports (file_locks)</A> <LI><A HREF="ciao_79.html#SEC341">Known bugs and planned improvements (file_locks)</A> </UL> <H2><A NAME="SEC339" HREF="ciao_toc.html#TOC339">Usage and interface (<CODE>file_locks</CODE>)</A></H2> <div class="cartouche"> <UL> <LI><STRONG>Library usage:</STRONG> <CODE>:- use_module(library(file_locks)).</CODE> <LI><STRONG>Exports:</STRONG> <UL> <LI><EM>Predicates:</EM> <A NAME="IDX4573"></A> <CODE>lock_file/3</CODE>, <A NAME="IDX4574"></A> <CODE>unlock_file/2</CODE>. </UL> </UL> </div class="cartouche"> <H2><A NAME="SEC340" HREF="ciao_toc.html#TOC340">Documentation on exports (<CODE>file_locks</CODE>)</A></H2> <P> <A NAME="IDX4575"></A> <A NAME="IDX4576"></A> <DL> <DT><span class="define">PREDICATE:</span> <B>lock_file/3:</B> <DD><A NAME="IDX4577"></A> <P> <STRONG>Usage:</STRONG> <CODE>lock_file(File, LockType, Result)</CODE> <UL> <LI><EM>Description:</EM> Tries to lock <CODE>File</CODE> with <CODE>LockType</CODE> and returns the result (either <CODE>true</CODE> or <CODE>false</CODE>) in <CODE>Result</CODE>. <LI><EM>The following properties should hold at call time:</EM> <CODE>File</CODE> is an atom. (<CODE>basic_props:atm/1</CODE>) <CODE>LockType</CODE> is an atom. (<CODE>basic_props:atm/1</CODE>) <CODE>Result</CODE> is an atom. (<CODE>basic_props:atm/1</CODE>) </UL> </DL> <P> <A NAME="IDX4578"></A> <A NAME="IDX4579"></A> <DL> <DT><span class="define">PREDICATE:</span> <B>unlock_file/2:</B> <DD><A NAME="IDX4580"></A> <P> <STRONG>Usage:</STRONG> <CODE>unlock_file(File, Result)</CODE> <UL> <LI><EM>Description:</EM> Tries to unlock <CODE>File</CODE> the result (either <CODE>true</CODE> or <CODE>false</CODE>) in <CODE>Result</CODE>. <LI><EM>The following properties should hold at call time:</EM> <CODE>File</CODE> is an atom. (<CODE>basic_props:atm/1</CODE>) <CODE>Result</CODE> is an atom. (<CODE>basic_props:atm/1</CODE>) </UL> </DL> <H2><A NAME="SEC341" HREF="ciao_toc.html#TOC341">Known bugs and planned improvements (<CODE>file_locks</CODE>)</A></H2> <UL> <LI> No doing anything helpful. </UL> <P><HR><P> Go to the <A HREF="ciao_1.html">first</A>, <A HREF="ciao_78.html">previous</A>, <A HREF="ciao_80.html">next</A>, <A HREF="ciao_241.html">last</A> section, <A HREF="ciao_toc.html">table of contents</A>. </BODY> </HTML>