<html>
<head>
<title>/vobs/ttcn/TCC_Common/Libraries/TCCUsefulFunctions_CNL113472/src/TCCFileIO.cc - TCCUsefulFunctions</title>
<link rel="stylesheet" type="text/css" href="../styles/main.css">
<script language=JavaScript src="../javascript/main.js"></script></head>
<body class="FramedContentPage" onLoad="NDOnLoad()">
<script language=JavaScript>
<!--
if (browserType) {document.write("<div class=" + browserType + ">");if (browserVer) {document.write("<div class=" + browserVer + ">"); }}// --></script>

<!--  Generated by Natural Docs, version 1.4 -->
<!--  http://www.naturaldocs.org  -->

<!-- saved from url=(0026)http://www.naturaldocs.org -->




<div id=Content>
<div class="CFile">
<div class=CTopic id=MainTopic>
<h1 class=CTitle>
<a name="TCCFileIO.cc"></a>TCCFileIO.cc</h1>
<div class=CBody>
<!--START_ND_SUMMARY-->
<div class=Summary>
<div class=STitle>Summary</div>
<div class=SBorder>
<table border=0 cellspacing=0 cellpadding=0 class=STable>
<tr class="SMain">
<td class=SEntry>
<a href="#TCCFileIO.cc" >TCCFileIO.cc</a></td>
<td class=SDescription></td></tr>
<tr class="SGroup">
<td class=SEntry>
<a href="#Functions" >Functions</a></td>
<td class=SDescription></td></tr>
<tr class="SFunction SIndent1 SMarked">
<td class=SEntry>
<a href="#f__FIO__get__error__string" >f__FIO__get__error__string</a></td>
<td class=SDescription>Returns the actual error message.</td></tr>
<tr class="SFunction SIndent1">
<td class=SEntry>
<a href="#f__FIO__get__error__code" >f__FIO__get__error__code</a></td>
<td class=SDescription>Returns the actual error code.</td></tr>
<tr class="SFunction SIndent1 SMarked">
<td class=SEntry>
<a href="#f__FIO__realize__error" >f__FIO__realize__error</a></td>
<td class=SDescription>Builds the error message. </td></tr>
<tr class="SFunction SIndent1">
<td class=SEntry>
<a href="#f__FIO__opened" >f__FIO__opened</a></td>
<td class=SDescription>Checks if the file with the given name is already opened. </td></tr>
<tr class="SFunction SIndent1 SMarked">
<td class=SEntry>
<a href="#f__FIO__opened" >f__FIO__opened</a></td>
<td class=SDescription>Checks if there is a file opened with the given file descriptor. </td></tr>
<tr class="SFunction SIndent1">
<td class=SEntry>
<a href="#f__FIO__open" >f__FIO__open</a></td>
<td class=SDescription>Opens a file with the given name in the given mode. </td></tr>
<tr class="SFunction SIndent1 SMarked">
<td class=SEntry>
<a href="#f__FIO__open__rdonly" >f__FIO__open__rdonly</a></td>
<td class=SDescription>A wrapper function for f__FIO__open. </td></tr>
<tr class="SFunction SIndent1">
<td class=SEntry>
<a href="#f__FIO__open__append__wronly" >f__FIO__open__append__wronly</a></td>
<td class=SDescription>A wrapper function for f__FIO__open. </td></tr>
<tr class="SFunction SIndent1 SMarked">
<td class=SEntry>
<a href="#f__FIO__open__append__rdwr" >f__FIO__open__append__rdwr</a></td>
<td class=SDescription>A wrapper function for f__FIO__open. </td></tr>
<tr class="SFunction SIndent1">
<td class=SEntry>
<a href="#f__FIO__open__trunc__wronly" >f__FIO__open__trunc__wronly</a></td>
<td class=SDescription>A wrapper function for f__FIO__open. </td></tr>
<tr class="SFunction SIndent1 SMarked">
<td class=SEntry>
<a href="#f__FIO__open__trunc__rdwr" >f__FIO__open__trunc__rdwr</a></td>
<td class=SDescription>A wrapper function for f__FIO__open. </td></tr>
<tr class="SFunction SIndent1">
<td class=SEntry>
<a href="#f__FIO__close" >f__FIO__close</a></td>
<td class=SDescription>Closes a file associated with the given file descriptor.</td></tr>
<tr class="SFunction SIndent1 SMarked">
<td class=SEntry>
<a href="#f__FIO__open__append__wronly__excl" >f__FIO__open__append__wronly__excl</a></td>
<td class=SDescription>A wrapper function for f__FIO__open. </td></tr>
<tr class="SFunction SIndent1">
<td class=SEntry>
<a href="#f__FIO__open__append__rdwr__excl" >f__FIO__open__append__rdwr__excl</a></td>
<td class=SDescription>A wrapper function for f__FIO__open. </td></tr>
<tr class="SFunction SIndent1 SMarked">
<td class=SEntry>
<a href="#f__FIO__open__trunc__wronly__excl" >f__FIO__open__trunc__wronly__excl</a></td>
<td class=SDescription>A wrapper function for f__FIO__open. </td></tr>
<tr class="SFunction SIndent1">
<td class=SEntry>
<a href="#f__FIO__open__trunc__rdwr__excl" >f__FIO__open__trunc__rdwr__excl</a></td>
<td class=SDescription>A wrapper function for f__FIO__open. </td></tr>
<tr class="SFunction SIndent1 SMarked">
<td class=SEntry>
<a href="#f__FIO__seek__home" >f__FIO__seek__home</a></td>
<td class=SDescription>Moves the file pointer to the beginning of the file.</td></tr>
<tr class="SFunction SIndent1">
<td class=SEntry>
<a href="#f__FIO__seek__end" >f__FIO__seek__end</a></td>
<td class=SDescription>Moves the file pointer to the end of the file.</td></tr>
<tr class="SFunction SIndent1 SMarked">
<td class=SEntry>
<a href="#f__FIO__seek__forward" >f__FIO__seek__forward</a></td>
<td class=SDescription>Moves the file pointer forward with a given number of bytes from the current position.</td></tr>
<tr class="SFunction SIndent1">
<td class=SEntry>
<a href="#f__FIO__seek__backward" >f__FIO__seek__backward</a></td>
<td class=SDescription>Moves the file pointer backward with a given number of bytes from the current position.</td></tr>
<tr class="SFunction SIndent1 SMarked">
<td class=SEntry>
<a href="#f__FIO__flush" >f__FIO__flush</a></td>
<td class=SDescription>Transfers (&ldquo;flushes&rdquo;) all modified in-core data of the file referred to by the file descriptor to the disk device.</td></tr>
<tr class="SFunction SIndent1">
<td class=SEntry>
<a href="#f__FIO__write" >f__FIO__write</a></td>
<td class=SDescription>Writes the given data to the file associated with the given file descriptor. </td></tr>
<tr class="SFunction SIndent1 SMarked">
<td class=SEntry>
<a href="#f__FIO__write__text" >f__FIO__write__text</a></td>
<td class=SDescription>A wrapper function for f__FIO__write. </td></tr>
<tr class="SFunction SIndent1">
<td class=SEntry>
<a href="#f__FIO__write__text__flush" >f__FIO__write__text__flush</a></td>
<td class=SDescription>A wrapper function for f__FIO__write. </td></tr>
<tr class="SFunction SIndent1 SMarked">
<td class=SEntry>
<a href="#f__FIO__write__data" >f__FIO__write__data</a></td>
<td class=SDescription>A wrapper function for f__FIO__write. </td></tr>
<tr class="SFunction SIndent1">
<td class=SEntry>
<a href="#f__FIO__write__data__flush" >f__FIO__write__data__flush</a></td>
<td class=SDescription>A wrapper function for f__FIO__write. </td></tr>
<tr class="SFunction SIndent1 SMarked">
<td class=SEntry>
<a href="#f__FIO__read" >f__FIO__read</a></td>
<td class=SDescription>Reads a given number of bytes to a given buffer from a file associated with the given file descriptor. </td></tr>
<tr class="SFunction SIndent1">
<td class=SEntry>
<a href="#f__FIO__read__text" >f__FIO__read__text</a></td>
<td class=SDescription>A wrapper function for f__FIO__read. </td></tr>
<tr class="SFunction SIndent1 SMarked">
<td class=SEntry>
<a href="#f__FIO__read__data" >f__FIO__read__data</a></td>
<td class=SDescription>A wrapper function for f__FIO__read. </td></tr>
<tr class="SFunction SIndent1">
<td class=SEntry>
<a href="#f__FIO__read__text__until" >f__FIO__read__text__until</a></td>
<td class=SDescription>It reads textual data until a given pattern is matched.</td></tr>
<tr class="SFunction SIndent1 SMarked">
<td class=SEntry>
<a href="#f__FIO__read__data__until" >f__FIO__read__data__until</a></td>
<td class=SDescription>It reads binary data until a given pattern is matched.</td></tr>
<tr class="SFunction SIndent1">
<td class=SEntry>
<a href="#f__FIO__set__filedescriptor__previousline" >f__FIO__set__filedescriptor__previousline</a></td>
<td class=SDescription>It sets the file descriptor to the begin of the previous line.</td></tr>
<tr class="SFunction SIndent1 SMarked">
<td class=SEntry>
<a href="#f__FIO__read__data__TLV" >f__FIO__read__data__TLV</a></td>
<td class=SDescription>It reads binary data until a full ASN.1 TLV structure is read.</td></tr>
<tr class="SFunction SIndent1">
<td class=SEntry>
<a href="#f__FIO__chdir" >f__FIO__chdir</a></td>
<td class=SDescription>It changes the current directory.</td></tr>
<tr class="SFunction SIndent1 SMarked">
<td class=SEntry>
<a href="#f_FIO_mkdir" >f_FIO_mkdir</a></td>
<td class=SDescription>Create a new directory</td></tr>
<tr class="SFunction SIndent1">
<td class=SEntry>
<a href="#f_FIO_rmdir" >f_FIO_rmdir</a></td>
<td class=SDescription>Removes a directory</td></tr>
<tr class="SFunction SIndent1 SMarked">
<td class=SEntry>
<a href="#f_FIO_fileOrDirExists" >f_FIO_fileOrDirExists</a></td>
<td class=SDescription>Checks the existence of files and directories.</td></tr>
<tr class="SFunction SIndent1">
<td class=SEntry>
<a href="#f_FIO_stat" >f_FIO_stat</a></td>
<td class=SDescription>Query the permissions of the file or directory.</td></tr>
<tr class="SFunction SIndent1 SMarked">
<td class=SEntry>
<a href="#f_FIO_chmod" >f_FIO_chmod</a></td>
<td class=SDescription>Change the permissions of the file or directory.</td></tr></table></div></div>
<!--END_ND_SUMMARY--></div></div></div>

<div class="CGroup">
<div class=CTopic>
<h3 class=CTitle>
<a name="Functions"></a>Functions</h3></div></div>

<div class="CFunction">
<div class=CTopic>
<h3 class=CTitle>
<a name="f__FIO__get__error__string"></a>f__FIO__get__error__string</h3>
<div class=CBody>
<p>Returns the actual error message.</p>
<h4 class=CHeading>Returns</h4>
<p>The actual error message as a string.</p></div></div></div>

<div class="CFunction">
<div class=CTopic>
<h3 class=CTitle>
<a name="f__FIO__get__error__code"></a>f__FIO__get__error__code</h3>
<div class=CBody>
<p>Returns the actual error code.</p>
<h4 class=CHeading>Returns</h4>
<p>The actual error message as a string.</p></div></div></div>

<div class="CFunction">
<div class=CTopic>
<h3 class=CTitle>
<a name="f__FIO__realize__error"></a>f__FIO__realize__error</h3>
<div class=CBody>
<p>Builds the error message.&nbsp;  (For internal use only.)</p>
<h4 class=CHeading>Returns</h4>
<p>Always -1.</p></div></div></div>

<div class="CFunction">
<div class=CTopic>
<h3 class=CTitle>
<a name="f__FIO__opened"></a>f__FIO__opened</h3>
<div class=CBody>
<p>Checks if the file with the given name is already opened.&nbsp;  This function runs in linear time.&nbsp;  (For internal use only.)</p>
<h4 class=CHeading>Parameters</h4>
<table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList>
<tr>
<td class=CDLEntry>NAME</td>
<td class=CDLDescription>The name of the file.</td></tr></table>
<h4 class=CHeading>Returns</h4>
<p>The file descriptor of the file or -1 if the file is not yet opened.</p></div></div></div>

<div class="CFunction">
<div class=CTopic>
<h3 class=CTitle>
<a name="f__FIO__opened"></a>f__FIO__opened</h3>
<div class=CBody>
<p>Checks if there is a file opened with the given file descriptor.&nbsp;  This function runs in logarithmic time.&nbsp;  (For internal use only.)</p>
<h4 class=CHeading>Parameters</h4>
<table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList>
<tr>
<td class=CDLEntry>FD</td>
<td class=CDLDescription>The descriptor for the file.</td></tr></table>
<h4 class=CHeading>Returns</h4>
<p>The name of the file or an empty string if the file is not yet opened.</p></div></div></div>

<div class="CFunction">
<div class=CTopic>
<h3 class=CTitle>
<a name="f__FIO__open"></a>f__FIO__open</h3>
<div class=CBody>
<p>Opens a file with the given name in the given mode.&nbsp;  It creates the file if it doesn&rsquo;t exist.&nbsp;  (For internal use only.)</p>
<h4 class=CHeading>Parameters</h4>
<table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList>
<tr>
<td class=CDLEntry>NAME</td>
<td class=CDLDescription>The name of the file.</td></tr>
<tr>
<td class=CDLEntry>FLAGS</td>
<td class=CDLDescription>The way to open the file.</td></tr></table>
<h4 class=CHeading>Returns</h4>
<p>The file descriptor for the file or -1 on error.&nbsp;  The error message is available through the f__FIO__get__error function.</p></div></div></div>

<div class="CFunction">
<div class=CTopic>
<h3 class=CTitle>
<a name="f__FIO__open__rdonly"></a>f__FIO__open__rdonly</h3>
<div class=CBody>
<p>A wrapper function for f__FIO__open.&nbsp;  It opens the file with the given name for reading only.</p>
<h4 class=CHeading>Parameters</h4>
<table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList>
<tr>
<td class=CDLEntry>NAME</td>
<td class=CDLDescription>The name of the file.</td></tr></table>
<h4 class=CHeading>Returns</h4>
<p>What f__FIO__open returns.</p></div></div></div>

<div class="CFunction">
<div class=CTopic>
<h3 class=CTitle>
<a name="f__FIO__open__append__wronly"></a>f__FIO__open__append__wronly</h3>
<div class=CBody>
<p>A wrapper function for f__FIO__open.&nbsp;  It opens the file with the given name for writing only.&nbsp;  If the file already exists it is opened in appending mode.</p>
<h4 class=CHeading>Parameters</h4>
<table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList>
<tr>
<td class=CDLEntry>NAME</td>
<td class=CDLDescription>The name of the file.</td></tr></table>
<h4 class=CHeading>Returns</h4>
<p>What f__FIO__open returns.</p></div></div></div>

<div class="CFunction">
<div class=CTopic>
<h3 class=CTitle>
<a name="f__FIO__open__append__rdwr"></a>f__FIO__open__append__rdwr</h3>
<div class=CBody>
<p>A wrapper function for f__FIO__open.&nbsp;  It opens the file with the given name for reading and writing.&nbsp;  If the file already exists it is opened in appending mode.</p>
<h4 class=CHeading>Parameters</h4>
<table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList>
<tr>
<td class=CDLEntry>NAME</td>
<td class=CDLDescription>The name of the file.</td></tr></table>
<h4 class=CHeading>Returns</h4>
<p>What f__FIO__open returns.</p></div></div></div>

<div class="CFunction">
<div class=CTopic>
<h3 class=CTitle>
<a name="f__FIO__open__trunc__wronly"></a>f__FIO__open__trunc__wronly</h3>
<div class=CBody>
<p>A wrapper function for f__FIO__open.&nbsp;  It opens the file with the given name for writing only.&nbsp;  If the file was not empty it is truncated.</p>
<h4 class=CHeading>Parameters</h4>
<table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList>
<tr>
<td class=CDLEntry>NAME</td>
<td class=CDLDescription>The name of the file.</td></tr></table>
<h4 class=CHeading>Returns</h4>
<p>What f__FIO__open returns.</p></div></div></div>

<div class="CFunction">
<div class=CTopic>
<h3 class=CTitle>
<a name="f__FIO__open__trunc__rdwr"></a>f__FIO__open__trunc__rdwr</h3>
<div class=CBody>
<p>A wrapper function for f__FIO__open.&nbsp;  It opens the file with the given name for reading and writing.&nbsp;  If the file was not empty it is truncated.</p>
<h4 class=CHeading>Parameters</h4>
<table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList>
<tr>
<td class=CDLEntry>NAME</td>
<td class=CDLDescription>The name of the file.</td></tr></table>
<h4 class=CHeading>Returns</h4>
<p>What f__FIO__open returns.</p></div></div></div>

<div class="CFunction">
<div class=CTopic>
<h3 class=CTitle>
<a name="f__FIO__close"></a>f__FIO__close</h3>
<div class=CBody>
<p>Closes a file associated with the given file descriptor.</p>
<h4 class=CHeading>Parameters</h4>
<table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList>
<tr>
<td class=CDLEntry>FD</td>
<td class=CDLDescription>The file descriptor to close.</td></tr></table>
<h4 class=CHeading>Returns</h4>
<p>What the POSIX function close returns.</p></div></div></div>

<div class="CFunction">
<div class=CTopic>
<h3 class=CTitle>
<a name="f__FIO__open__append__wronly__excl"></a>f__FIO__open__append__wronly__excl</h3>
<div class=CBody>
<p>A wrapper function for f__FIO__open.&nbsp;  It opens the file with the given name for writing only in exclusive mode.&nbsp;  If the file already exists it is opened in appending mode.</p>
<h4 class=CHeading>Parameters</h4>
<table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList>
<tr>
<td class=CDLEntry>NAME</td>
<td class=CDLDescription>The name of the file.</td></tr></table>
<h4 class=CHeading>Returns</h4>
<p>What f__FIO__open returns or -1 if the file cannot be locked.</p></div></div></div>

<div class="CFunction">
<div class=CTopic>
<h3 class=CTitle>
<a name="f__FIO__open__append__rdwr__excl"></a>f__FIO__open__append__rdwr__excl</h3>
<div class=CBody>
<p>A wrapper function for f__FIO__open.&nbsp;  It opens the file with the given name for reading and writing in exclusive mode.&nbsp;  If the file already exists it is opened in appending mode.</p>
<h4 class=CHeading>Parameters</h4>
<table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList>
<tr>
<td class=CDLEntry>NAME</td>
<td class=CDLDescription>The name of the file.</td></tr></table>
<h4 class=CHeading>Returns</h4>
<p>What f__FIO__open returns or -1 if the file cannot be locked.</p></div></div></div>

<div class="CFunction">
<div class=CTopic>
<h3 class=CTitle>
<a name="f__FIO__open__trunc__wronly__excl"></a>f__FIO__open__trunc__wronly__excl</h3>
<div class=CBody>
<p>A wrapper function for f__FIO__open.&nbsp;  It opens the file with the given name for writing only in exclusive mode.&nbsp;  If the file was not empty it is truncated.</p>
<h4 class=CHeading>Parameters</h4>
<table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList>
<tr>
<td class=CDLEntry>NAME</td>
<td class=CDLDescription>The name of the file.</td></tr></table>
<h4 class=CHeading>Returns</h4>
<p>What f__FIO__open returns or -1 if the file cannot be locked.</p></div></div></div>

<div class="CFunction">
<div class=CTopic>
<h3 class=CTitle>
<a name="f__FIO__open__trunc__rdwr__excl"></a>f__FIO__open__trunc__rdwr__excl</h3>
<div class=CBody>
<p>A wrapper function for f__FIO__open.&nbsp;  It opens the file with the given name for reading and writing in exclusive mode.&nbsp;  If the file was not empty it is truncated.</p>
<h4 class=CHeading>Parameters</h4>
<table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList>
<tr>
<td class=CDLEntry>NAME</td>
<td class=CDLDescription>The name of the file.</td></tr></table>
<h4 class=CHeading>Returns</h4>
<p>What f__FIO__open returns or -1 if the file cannot be locked.</p></div></div></div>

<div class="CFunction">
<div class=CTopic>
<h3 class=CTitle>
<a name="f__FIO__seek__home"></a>f__FIO__seek__home</h3>
<div class=CBody>
<p>Moves the file pointer to the beginning of the file.</p>
<h4 class=CHeading>Parameters</h4>
<table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList>
<tr>
<td class=CDLEntry>FD</td>
<td class=CDLDescription>A file descriptor.</td></tr></table>
<h4 class=CHeading>Returns</h4>
<p>What the POSIX function lseek returns.</p></div></div></div>

<div class="CFunction">
<div class=CTopic>
<h3 class=CTitle>
<a name="f__FIO__seek__end"></a>f__FIO__seek__end</h3>
<div class=CBody>
<p>Moves the file pointer to the end of the file.</p>
<h4 class=CHeading>Parameters</h4>
<table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList>
<tr>
<td class=CDLEntry>FD</td>
<td class=CDLDescription>A file descriptor.</td></tr></table>
<h4 class=CHeading>Returns</h4>
<p>What the POSIX function lseek returns.</p></div></div></div>

<div class="CFunction">
<div class=CTopic>
<h3 class=CTitle>
<a name="f__FIO__seek__forward"></a>f__FIO__seek__forward</h3>
<div class=CBody>
<p>Moves the file pointer forward with a given number of bytes from the current position.</p>
<h4 class=CHeading>Parameters</h4>
<table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList>
<tr>
<td class=CDLEntry>FD</td>
<td class=CDLDescription>A file descriptor.</td></tr>
<tr>
<td class=CDLEntry>BYTES</td>
<td class=CDLDescription>The number of bytes.</td></tr></table>
<h4 class=CHeading>Returns</h4>
<p>What the POSIX function lseek returns.</p></div></div></div>

<div class="CFunction">
<div class=CTopic>
<h3 class=CTitle>
<a name="f__FIO__seek__backward"></a>f__FIO__seek__backward</h3>
<div class=CBody>
<p>Moves the file pointer backward with a given number of bytes from the current position.</p>
<h4 class=CHeading>Parameters</h4>
<table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList>
<tr>
<td class=CDLEntry>FD</td>
<td class=CDLDescription>A file descriptor.</td></tr>
<tr>
<td class=CDLEntry>BYTES</td>
<td class=CDLDescription>The number of bytes.</td></tr></table>
<h4 class=CHeading>Returns</h4>
<p>What the POSIX function lseek returns.</p></div></div></div>

<div class="CFunction">
<div class=CTopic>
<h3 class=CTitle>
<a name="f__FIO__flush"></a>f__FIO__flush</h3>
<div class=CBody>
<p>Transfers (&ldquo;flushes&rdquo;) all modified in-core data of the file referred to by the file descriptor to the disk device.</p>
<h4 class=CHeading>Parameters</h4>
<table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList>
<tr>
<td class=CDLEntry>FD</td>
<td class=CDLDescription>A file descriptor.</td></tr></table>
<h4 class=CHeading>Returns</h4>
<p>What fsync returns.</p></div></div></div>

<div class="CFunction">
<div class=CTopic>
<h3 class=CTitle>
<a name="f__FIO__write"></a>f__FIO__write</h3>
<div class=CBody>
<p>Writes the given data to the file associated with the given file descriptor.&nbsp;  It works with textual and binary data.&nbsp;  (For internal use only.)</p>
<h4 class=CHeading>Parameters</h4>
<table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList>
<tr>
<td class=CDLEntry>FD</td>
<td class=CDLDescription>A file descriptor.</td></tr>
<tr>
<td class=CDLEntry>DATA</td>
<td class=CDLDescription>The data to write to the file.</td></tr></table>
<h4 class=CHeading>Returns</h4>
<p>The number of bytes written or -1 on error.</p></div></div></div>

<div class="CFunction">
<div class=CTopic>
<h3 class=CTitle>
<a name="f__FIO__write__text"></a>f__FIO__write__text</h3>
<div class=CBody>
<p>A wrapper function for f__FIO__write.&nbsp;  It writes textual data.</p>
<h4 class=CHeading>Parameters</h4>
<table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList>
<tr>
<td class=CDLEntry>FD</td>
<td class=CDLDescription>A file descriptor.</td></tr>
<tr>
<td class=CDLEntry>TEXT</td>
<td class=CDLDescription>The text to write to the file.</td></tr></table>
<h4 class=CHeading>Returns</h4>
<p>What f__FIO__write returns.</p></div></div></div>

<div class="CFunction">
<div class=CTopic>
<h3 class=CTitle>
<a name="f__FIO__write__text__flush"></a>f__FIO__write__text__flush</h3>
<div class=CBody>
<p>A wrapper function for f__FIO__write.&nbsp;  It writes textual data and calls f__FIO__flush.</p>
<h4 class=CHeading>Parameters</h4>
<table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList>
<tr>
<td class=CDLEntry>FD</td>
<td class=CDLDescription>A file descriptor.</td></tr>
<tr>
<td class=CDLEntry>TEXT</td>
<td class=CDLDescription>The text to write to the file.</td></tr></table>
<h4 class=CHeading>Returns</h4>
<p>What f__FIO__write returns.</p></div></div></div>

<div class="CFunction">
<div class=CTopic>
<h3 class=CTitle>
<a name="f__FIO__write__data"></a>f__FIO__write__data</h3>
<div class=CBody>
<p>A wrapper function for f__FIO__write.&nbsp;  It writes binary data.</p>
<h4 class=CHeading>Parameters</h4>
<table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList>
<tr>
<td class=CDLEntry>FD</td>
<td class=CDLDescription>A file descriptor.</td></tr>
<tr>
<td class=CDLEntry>DATA</td>
<td class=CDLDescription>The data to write to the file.</td></tr></table>
<h4 class=CHeading>Returns</h4>
<p>What f__FIO__write returns.</p></div></div></div>

<div class="CFunction">
<div class=CTopic>
<h3 class=CTitle>
<a name="f__FIO__write__data__flush"></a>f__FIO__write__data__flush</h3>
<div class=CBody>
<p>A wrapper function for f__FIO__write.&nbsp;  It writes binary data and calls f__FIO__flush.</p>
<h4 class=CHeading>Parameters</h4>
<table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList>
<tr>
<td class=CDLEntry>FD</td>
<td class=CDLDescription>A file descriptor.</td></tr>
<tr>
<td class=CDLEntry>DATA</td>
<td class=CDLDescription>The data to write to the file.</td></tr></table>
<h4 class=CHeading>Returns</h4>
<p>What f__FIO__write returns.</p></div></div></div>

<div class="CFunction">
<div class=CTopic>
<h3 class=CTitle>
<a name="f__FIO__read"></a>f__FIO__read</h3>
<div class=CBody>
<p>Reads a given number of bytes to a given buffer from a file associated with the given file descriptor.&nbsp;  (For internal use only.)</p>
<h4 class=CHeading>Parameters</h4>
<table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList>
<tr>
<td class=CDLEntry>FD</td>
<td class=CDLDescription>A file descriptor.</td></tr>
<tr>
<td class=CDLEntry>DATA</td>
<td class=CDLDescription>The buffer where the data will be stored.</td></tr>
<tr>
<td class=CDLEntry>BYTES</td>
<td class=CDLDescription>The number of bytes to read.</td></tr></table>
<h4 class=CHeading>Returns</h4>
<p>The number of bytes read or -1 if the requested number of bytes couldn&rsquo;t be read.</p></div></div></div>

<div class="CFunction">
<div class=CTopic>
<h3 class=CTitle>
<a name="f__FIO__read__text"></a>f__FIO__read__text</h3>
<div class=CBody>
<p>A wrapper function for f__FIO__read.&nbsp;  It reads textual data.</p>
<h4 class=CHeading>Parameters</h4>
<table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList>
<tr>
<td class=CDLEntry>FD</td>
<td class=CDLDescription>A file descriptor.</td></tr>
<tr>
<td class=CDLEntry>TEXT</td>
<td class=CDLDescription>The buffer for storing the text.</td></tr>
<tr>
<td class=CDLEntry>BYTES</td>
<td class=CDLDescription>The number of bytes to read.</td></tr></table>
<h4 class=CHeading>Returns</h4>
<p>What f__FIO__read returns.</p></div></div></div>

<div class="CFunction">
<div class=CTopic>
<h3 class=CTitle>
<a name="f__FIO__read__data"></a>f__FIO__read__data</h3>
<div class=CBody>
<p>A wrapper function for f__FIO__read.&nbsp;  It reads binary data.</p>
<h4 class=CHeading>Parameters</h4>
<table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList>
<tr>
<td class=CDLEntry>FD</td>
<td class=CDLDescription>A file descriptor.</td></tr>
<tr>
<td class=CDLEntry>DATA</td>
<td class=CDLDescription>The buffer for storing the data.</td></tr>
<tr>
<td class=CDLEntry>BYTES</td>
<td class=CDLDescription>The number of bytes to read.</td></tr></table>
<h4 class=CHeading>Returns</h4>
<p>What f__FIO__read returns.</p></div></div></div>

<div class="CFunction">
<div class=CTopic>
<h3 class=CTitle>
<a name="f__FIO__read__text__until"></a>f__FIO__read__text__until</h3>
<div class=CBody>
<p>It reads textual data until a given pattern is matched.</p>
<h4 class=CHeading>Parameters</h4>
<table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList>
<tr>
<td class=CDLEntry>FD</td>
<td class=CDLDescription>A file descriptor.</td></tr>
<tr>
<td class=CDLEntry>TEXT</td>
<td class=CDLDescription>The buffer for storing the text.</td></tr>
<tr>
<td class=CDLEntry>SEPARATOR</td>
<td class=CDLDescription>The separator pattern.</td></tr></table>
<h4 class=CHeading>Returns</h4>
<p>The number of bytes read from the file, not including the delimiter.&nbsp;  In case of error it returns -1.</p></div></div></div>

<div class="CFunction">
<div class=CTopic>
<h3 class=CTitle>
<a name="f__FIO__read__data__until"></a>f__FIO__read__data__until</h3>
<div class=CBody>
<p>It reads binary data until a given pattern is matched.</p>
<h4 class=CHeading>Parameters</h4>
<table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList>
<tr>
<td class=CDLEntry>FD</td>
<td class=CDLDescription>A file descriptor.</td></tr>
<tr>
<td class=CDLEntry>TEXT</td>
<td class=CDLDescription>The buffer for storing the data.</td></tr>
<tr>
<td class=CDLEntry>SEPARATOR</td>
<td class=CDLDescription>The separator pattern.</td></tr></table>
<h4 class=CHeading>Returns</h4>
<p>The number of bytes read from the file, not including the delimiter.&nbsp;  In case of error it returns -1.</p></div></div></div>

<div class="CFunction">
<div class=CTopic>
<h3 class=CTitle>
<a name="f__FIO__set__filedescriptor__previousline"></a>f__FIO__set__filedescriptor__previousline</h3>
<div class=CBody>
<p>It sets the file descriptor to the begin of the previous line.</p>
<h4 class=CHeading>Parameters</h4>
<table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList>
<tr>
<td class=CDLEntry>FD</td>
<td class=CDLDescription>A file descriptor.</td></tr></table>
<h4 class=CHeading>Returns</h4>
<p>If there was no problem, then the return value will be 1.</p></div></div></div>

<div class="CFunction">
<div class=CTopic>
<h3 class=CTitle>
<a name="f__FIO__read__data__TLV"></a>f__FIO__read__data__TLV</h3>
<div class=CBody>
<p>It reads binary data until a full ASN.1 TLV structure is read.</p>
<h4 class=CHeading>Parameters</h4>
<table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList>
<tr>
<td class=CDLEntry>FD</td>
<td class=CDLDescription>A file descriptor.</td></tr>
<tr>
<td class=CDLEntry>TEXT</td>
<td class=CDLDescription>The buffer for storing the data.</td></tr></table>
<h4 class=CHeading>Returns</h4>
<p>The number of bytes read from the file.&nbsp;  In case of error it returns -1.</p></div></div></div>

<div class="CFunction">
<div class=CTopic>
<h3 class=CTitle>
<a name="f__FIO__chdir"></a>f__FIO__chdir</h3>
<div class=CBody>
<p>It changes the current directory.</p>
<h4 class=CHeading>Parameters</h4>
<table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList>
<tr>
<td class=CDLEntry>NAME</td>
<td class=CDLDescription>The name of the new directory.</td></tr></table>
<h4 class=CHeading>Returns</h4>
<p>Boolean value for successful or unsuccessful directory change</p></div></div></div>

<div class="CFunction">
<div class=CTopic>
<h3 class=CTitle>
<a name="f_FIO_mkdir"></a>f_FIO_mkdir</h3>
<div class=CBody>
<h4 class=CHeading>Purpose</h4>
<p>Create a new directory</p>
<h4 class=CHeading>Parameters</h4>
<table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList>
<tr>
<td class=CDLEntry>p_dir_name</td>
<td class=CDLDescription>
<b>in</b>
<b>charstring</b> - name of the directory to create</td></tr></table>
<h4 class=CHeading>Return Value</h4>
<table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList>
<tr>
<td class=CDLEntry>boolean</td>
<td class=CDLDescription>indicate the successful or unsuccessful directory creation</td></tr></table>
<h4 class=CHeading>Errors</h4>
<p>In the case of unsuccessful operation the cause of the error can be queried  by the f_FIO_get_error_code, f_FIO_get_error_string functions</p>
<h4 class=CHeading>Detailed description</h4>
<p>The path to the directory must exist, so the existence of the path should be checked, and the missing directories should be created recursively.</p></div></div></div>

<div class="CFunction">
<div class=CTopic>
<h3 class=CTitle>
<a name="f_FIO_rmdir"></a>f_FIO_rmdir</h3>
<div class=CBody>
<h4 class=CHeading>Purpose</h4>
<p>Removes a directory</p>
<h4 class=CHeading>Parameters</h4>
<table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList>
<tr>
<td class=CDLEntry>p_dir_name</td>
<td class=CDLDescription>
<b>in</b>
<b>charstring</b> - name of the directory to remove</td></tr></table>
<h4 class=CHeading>Return Value</h4>
<table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList>
<tr>
<td class=CDLEntry>boolean</td>
<td class=CDLDescription>indicate the successful or unsuccessful directory creation</td></tr></table>
<h4 class=CHeading>Errors</h4>
<p>In the case of unsuccessful operation the cause of the error can be queried  by the f_FIO_get_error_code, f_FIO_get_error_string functions</p>
<h4 class=CHeading>Detailed description</h4>
<p>The directories must be empty, so the child directories should be cleaned and deleted recursively.</p></div></div></div>

<div class="CFunction">
<div class=CTopic>
<h3 class=CTitle>
<a name="f_FIO_fileOrDirExists"></a>f_FIO_fileOrDirExists</h3>
<div class=CBody>
<h4 class=CHeading>Purpose</h4>
<p>Checks the existence of files and directories.</p>
<h4 class=CHeading>Parameters</h4>
<table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList>
<tr>
<td class=CDLEntry>p_name</td>
<td class=CDLDescription>
<b>in</b>
<b>charstring</b> - name of the file or directory to check</td></tr></table>
<h4 class=CHeading>Return Value</h4>
<table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList>
<tr>
<td class=CDLEntry>boolean</td>
<td class=CDLDescription>indicate the exictense of the file or diectory</td></tr></table>
<h4 class=CHeading>Errors</h4>
<p>-</p>
<h4 class=CHeading>Detailed description</h4>
<p>-</p></div></div></div>

<div class="CFunction">
<div class=CTopic>
<h3 class=CTitle>
<a name="f_FIO_stat"></a>f_FIO_stat</h3>
<div class=CBody>
<h4 class=CHeading>Purpose</h4>
<p>Query the permissions of the file or directory.</p>
<h4 class=CHeading>Parameters</h4>
<table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList>
<tr>
<td class=CDLEntry>p_name</td>
<td class=CDLDescription>
<b>in</b>
<b>charstring</b> - name of the file or directory to check</td></tr>
<tr>
<td class=CDLEntry>p_permissions</td>
<td class=CDLDescription>
<b>out</b>
<b>FIO_permissions</b> - the permissions of the object</td></tr></table>
<h4 class=CHeading>Return Value</h4>
<table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList>
<tr>
<td class=CDLEntry>boolean</td>
<td class=CDLDescription>indicate sucessfull execution</td></tr></table>
<h4 class=CHeading>Errors</h4>
<p>-</p>
<h4 class=CHeading>Detailed description</h4>
<p>-</p></div></div></div>

<div class="CFunction">
<div class=CTopic>
<h3 class=CTitle>
<a name="f_FIO_chmod"></a>f_FIO_chmod</h3>
<div class=CBody>
<h4 class=CHeading>Purpose</h4>
<p>Change the permissions of the file or directory.</p>
<h4 class=CHeading>Parameters</h4>
<table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList>
<tr>
<td class=CDLEntry>p_name</td>
<td class=CDLDescription>
<b>in</b>
<b>charstring</b> - name of the file or directory to check</td></tr>
<tr>
<td class=CDLEntry>p_permissions</td>
<td class=CDLDescription>
<b>in</b>
<b>FIO_permissions</b> - the permissions of the object</td></tr></table>
<h4 class=CHeading>Return Value</h4>
<table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList>
<tr>
<td class=CDLEntry>boolean</td>
<td class=CDLDescription>indicate sucessfull execution</td></tr></table>
<h4 class=CHeading>Errors</h4>
<p>-</p>
<h4 class=CHeading>Detailed description</h4>
<p>Change the permissions of the file or directory according to the p_permissions.&nbsp; If the value of the field is:</p>
<ul>
<li>true: set the permission</li>
<li>false: clear the permission</li>
<li>omit: doesn&rsquo;t change the permission</li></ul></div></div></div>

</div>
<!--Content-->



<!--START_ND_TOOLTIPS-->
<!--END_ND_TOOLTIPS-->

<script language=JavaScript>
<!--
if (browserType) {if (browserVer) {document.write("</div>"); }document.write("</div>");}// --></script></body></html>