Location: PHPKode > scripts > XS PHP Library > xs-php-library/doc/io/File.html
<!DOCTYPE HTML PUBLIC '-//W3C//DTD HTML 4.0 Frameset//EN''http://www.w3.org/TR/REC-html40/frameset.dtd'>
<!--NewPage-->
<HTML>
<HEAD>
	<!-- Generated by PhpDoc date: 'Mon, 11 Nov 2002 23:46:31 +0100' -->
	<TITLE>Docs For Class File</TITLE>
<LINK REL ='stylesheet' TYPE='text/css' HREF='stylesheet.css' TITLE='Style'>
</HEAD>
<BODY BGCOLOR='white'>

<!-- Start of Class Data -->
<H2>
	Class File
</H2>
<pre>
<pre><a href="../core/Object.html">Object</a>
   |
   --File</pre>
</pre>
<H3>
	Classes extended from File:
</H3>

<p>
	<b><i>Located in File: Program_Root/file.inc.php</i></b><br>
</p>
<hr>
<!-- ========== Info from phpDoc block ========= -->
<b>File manipulation class.</b>
<pre>
File class is a wrapper used for basic file operations just like reading,
 writing, coping, etc.
</pre>
<UL>
	
	<LI><b>Package</b> - <CODE>io</CODE></LI>
	
	<LI><b>Version</b> - <CODE>$Id: File.html,v 1.2 2002/11/28 09:43:11 rbala Exp $</CODE></LI>
	
	<LI><b>Access</b> - <CODE>public</CODE></LI>
	
	<LI><b>Author</b> - <CODE>Robert Bala &lt;<a href="mailto:hide@address.com">hide@address.com</a>&gt;</CODE></LI>
	
</UL>

<hr>
<!-- =========== VAR SUMMARY =========== -->
<A NAME='var_summary'><!-- --></A>
<TABLE BORDER='1' CELLPADDING='3' CELLSPACING='0' WIDTH='100%'>
	<TR BGCOLOR='#CCCCFF' CLASS='TableHeadingColor'>
		<TD>
			<FONT SIZE='+2'><B>Class Variable Summary</B></FONT>
		</TD>
	</TR>

	
	<!-- =========== Summary =========== -->
	<TR BGCOLOR='white' CLASS='TableRowColor'>
		<TD>
			<CODE><B><A HREF='File.html#$_backup'>$_backup</A></B></CODE>
			<BR>
			<blockquote> Indicates whether works on orginal file or its copy. </blockquote>
			<blockquote> Default Value: <CODE>-><-</CODE> </blockquote>
		</TD>
	</TR>
	
	<!-- =========== Summary =========== -->
	<TR BGCOLOR='white' CLASS='TableRowColor'>
		<TD>
			<CODE><B><A HREF='File.html#$_buffer'>$_buffer</A></B></CODE>
			<BR>
			<blockquote> Number of bytes to read and write at IO operations. </blockquote>
			<blockquote> Default Value: <CODE>-><-</CODE> </blockquote>
		</TD>
	</TR>
	
	<!-- =========== Summary =========== -->
	<TR BGCOLOR='white' CLASS='TableRowColor'>
		<TD>
			<CODE><B><A HREF='File.html#$_handle'>$_handle</A></B></CODE>
			<BR>
			<blockquote> File handle. </blockquote>
			<blockquote> Default Value: <CODE>-><-</CODE> </blockquote>
		</TD>
	</TR>
	
	<!-- =========== Summary =========== -->
	<TR BGCOLOR='white' CLASS='TableRowColor'>
		<TD>
			<CODE><B><A HREF='File.html#$_locked'>$_locked</A></B></CODE>
			<BR>
			<blockquote> Indicates whether the file is locked or not. </blockquote>
			<blockquote> Default Value: <CODE>-><-</CODE> </blockquote>
		</TD>
	</TR>
	
	<!-- =========== Summary =========== -->
	<TR BGCOLOR='white' CLASS='TableRowColor'>
		<TD>
			<CODE><B><A HREF='File.html#$_mode'>$_mode</A></B></CODE>
			<BR>
			<blockquote> File access mode. </blockquote>
			<blockquote> Default Value: <CODE>-><-</CODE> </blockquote>
		</TD>
	</TR>
	
	<!-- =========== Summary =========== -->
	<TR BGCOLOR='white' CLASS='TableRowColor'>
		<TD>
			<CODE><B><A HREF='File.html#$_name'>$_name</A></B></CODE>
			<BR>
			<blockquote> Path to file or file name. </blockquote>
			<blockquote> Default Value: <CODE>-><-</CODE> </blockquote>
		</TD>
	</TR>
	
	<!-- =========== Summary =========== -->
	<TR BGCOLOR='white' CLASS='TableRowColor'>
		<TD>
			<CODE><B><A HREF='File.html#$_temp'>$_temp</A></B></CODE>
			<BR>
			<blockquote> Temporary file name when working with copy of the file. </blockquote>
			<blockquote> Default Value: <CODE>-><-</CODE> </blockquote>
		</TD>
	</TR>
	
</TABLE>

<hr>
<!-- =========== VAR SUMMARY =========== -->
<A NAME='var_summary'><!-- --></A>
<TABLE BORDER='1' CELLPADDING='3' CELLSPACING='0' WIDTH='100%'>
	<TR BGCOLOR='#CCCCFF' CLASS='TableHeadingColor'>
		<TD>
			<FONT SIZE='+2'><B>Inherited Class Variable Summary</B></FONT>
		</TD>
	</TR>

	
</TABLE>

<hr>
<!-- =========== INHERITED METHOD SUMMARY =========== -->
<A NAME='functions_inherited'><!-- --></A>
<TABLE BORDER='1' CELLPADDING='3' CELLSPACING='0' WIDTH='100%'>
	<TR BGCOLOR='#CCCCFF' CLASS='TableHeadingColor'>
		<TD>
			<FONT SIZE='+2'><B>Inherited Method Summary</B></FONT>
		</TD>
	</TR>

	
	<!-- =========== Summary =========== -->
	<TR BGCOLOR='white' CLASS='TableRowColor'>
		<TD>
			<FONT SIZE='+2'><B>Inherited From Class <a href="../core/Object.html">Object</a></B></FONT>
			<blockquote>
			<TABLE BORDER='1' CELLPADDING='3' CELLSPACING='0' WIDTH='95%'>
				<tr>
					<th>Function</th>
					<th>Description</th>
				</tr>
				
				<tr>
					<td><CODE><B><A HREF='../core/Object.html#constructor Object'>constructor Object (  )</A></B></CODE></td>
					<td>Object class constructor.</td>
				
				<tr>
					<td><CODE><B><A HREF='../core/Object.html#classMethods'>classMethods (  )</A></B></CODE></td>
					<td>Retrieves the class methods names of the object.</td>
				
				<tr>
					<td><CODE><B><A HREF='../core/Object.html#className'>className (  )</A></B></CODE></td>
					<td>Retrieves the name of the class of the object.</td>
				
				<tr>
					<td><CODE><B><A HREF='../core/Object.html#classParent'>classParent (  )</A></B></CODE></td>
					<td>Retrieves the parent class name for the object.</td>
				
				<tr>
					<td><CODE><B><A HREF='../core/Object.html#classProperties'>classProperties (  )</A></B></CODE></td>
					<td>Retrieves the class properties names of the object.</td>
				
				<tr>
					<td><CODE><B><A HREF='../core/Object.html#inheritsFrom'>inheritsFrom ( [$class = ] )</A></B></CODE></td>
					<td>Check if the objects inherits from the specified class.</td>
				
			</table>
			</blockquote>
		</TD>
	</TR>
	
</TABLE>

<br>
<!-- should have constructor at some point -->
<!-- =========== Method SUMMARY =========== -->
<A NAME='Method_summary'><!-- --></A>
<TABLE BORDER='1' CELLPADDING='3' CELLSPACING='0' WIDTH='100%'>
	<TR BGCOLOR='#CCCCFF' CLASS='TableHeadingColor'>
		<TD>
			<FONT SIZE='+2'><B>Method Summary</B></FONT>
		</TD>
	</TR>

	
	<!-- =========== Summary =========== -->
	<TR BGCOLOR='white' CLASS='TableRowColor'>
		<TD>
			<CODE><B><A HREF='File.html#constructor File'>void constructor File ( [$name = ''], [$mode = 'r'], [$backup = 'r'false'r'], [$buffer = 'r'1024'r'] )</A></B></CODE>
			<BR>
			<blockquote> File class constructor. </blockquote>
		</TD>
	</TR>
	
	<!-- =========== Summary =========== -->
	<TR BGCOLOR='white' CLASS='TableRowColor'>
		<TD>
			<CODE><B><A HREF='File.html#chmod'>mixed chmod ( [$mode = 0644] )</A></B></CODE>
			<BR>
			<blockquote> Attempts to change the mode of the file. </blockquote>
		</TD>
	</TR>
	
	<!-- =========== Summary =========== -->
	<TR BGCOLOR='white' CLASS='TableRowColor'>
		<TD>
			<CODE><B><A HREF='File.html#close'>mixed close (  )</A></B></CODE>
			<BR>
			<blockquote> Closes the file. </blockquote>
		</TD>
	</TR>
	
	<!-- =========== Summary =========== -->
	<TR BGCOLOR='white' CLASS='TableRowColor'>
		<TD>
			<CODE><B><A HREF='File.html#copy'>mixed copy ( $destination, [$mode = 0644] )</A></B></CODE>
			<BR>
			<blockquote> Attempts to copy the file. </blockquote>
		</TD>
	</TR>
	
	<!-- =========== Summary =========== -->
	<TR BGCOLOR='white' CLASS='TableRowColor'>
		<TD>
			<CODE><B><A HREF='File.html#delete'>mixed delete (  )</A></B></CODE>
			<BR>
			<blockquote> Attempts to delete the file. </blockquote>
		</TD>
	</TR>
	
	<!-- =========== Summary =========== -->
	<TR BGCOLOR='white' CLASS='TableRowColor'>
		<TD>
			<CODE><B><A HREF='File.html#exists'>boolean exists (  )</A></B></CODE>
			<BR>
			<blockquote> Checks whether a file exists. </blockquote>
		</TD>
	</TR>
	
	<!-- =========== Summary =========== -->
	<TR BGCOLOR='white' CLASS='TableRowColor'>
		<TD>
			<CODE><B><A HREF='File.html#getATime'>int getATime (  )</A></B></CODE>
			<BR>
			<blockquote> Gets the time the file was last accessed. </blockquote>
		</TD>
	</TR>
	
	<!-- =========== Summary =========== -->
	<TR BGCOLOR='white' CLASS='TableRowColor'>
		<TD>
			<CODE><B><A HREF='File.html#getBuffer'>int getBuffer (  )</A></B></CODE>
			<BR>
			<blockquote> Gets the file buffer size. </blockquote>
		</TD>
	</TR>
	
	<!-- =========== Summary =========== -->
	<TR BGCOLOR='white' CLASS='TableRowColor'>
		<TD>
			<CODE><B><A HREF='File.html#getCTime'>int getCTime (  )</A></B></CODE>
			<BR>
			<blockquote> Gets the time the file was last changed. </blockquote>
		</TD>
	</TR>
	
	<!-- =========== Summary =========== -->
	<TR BGCOLOR='white' CLASS='TableRowColor'>
		<TD>
			<CODE><B><A HREF='File.html#getGroup'>mixed getGroup (  )</A></B></CODE>
			<BR>
			<blockquote> Gets the group ID of the owner of the file. </blockquote>
		</TD>
	</TR>
	
	<!-- =========== Summary =========== -->
	<TR BGCOLOR='white' CLASS='TableRowColor'>
		<TD>
			<CODE><B><A HREF='File.html#getHandle'>mixed getHandle (  )</A></B></CODE>
			<BR>
			<blockquote> Gets the file handle. </blockquote>
		</TD>
	</TR>
	
	<!-- =========== Summary =========== -->
	<TR BGCOLOR='white' CLASS='TableRowColor'>
		<TD>
			<CODE><B><A HREF='File.html#getMode'>mixed getMode (  )</A></B></CODE>
			<BR>
			<blockquote> Gets the file access mode. </blockquote>
		</TD>
	</TR>
	
	<!-- =========== Summary =========== -->
	<TR BGCOLOR='white' CLASS='TableRowColor'>
		<TD>
			<CODE><B><A HREF='File.html#getMTime'>int getMTime (  )</A></B></CODE>
			<BR>
			<blockquote> Gets the time the file was last modified. </blockquote>
		</TD>
	</TR>
	
	<!-- =========== Summary =========== -->
	<TR BGCOLOR='white' CLASS='TableRowColor'>
		<TD>
			<CODE><B><A HREF='File.html#getName'>string getName (  )</A></B></CODE>
			<BR>
			<blockquote> Gets path to file or file name. </blockquote>
		</TD>
	</TR>
	
	<!-- =========== Summary =========== -->
	<TR BGCOLOR='white' CLASS='TableRowColor'>
		<TD>
			<CODE><B><A HREF='File.html#getOwner'>mixed getOwner (  )</A></B></CODE>
			<BR>
			<blockquote> Gets the user ID of the owner of the file. </blockquote>
		</TD>
	</TR>
	
	<!-- =========== Summary =========== -->
	<TR BGCOLOR='white' CLASS='TableRowColor'>
		<TD>
			<CODE><B><A HREF='File.html#getSize'>mixed getSize (  )</A></B></CODE>
			<BR>
			<blockquote> Gets the size of the file in bytes. </blockquote>
		</TD>
	</TR>
	
	<!-- =========== Summary =========== -->
	<TR BGCOLOR='white' CLASS='TableRowColor'>
		<TD>
			<CODE><B><A HREF='File.html#isEof'>boolean isEof (  )</A></B></CODE>
			<BR>
			<blockquote> Finds whether the file is at end-of-file or closed. </blockquote>
		</TD>
	</TR>
	
	<!-- =========== Summary =========== -->
	<TR BGCOLOR='white' CLASS='TableRowColor'>
		<TD>
			<CODE><B><A HREF='File.html#isExecutable'>boolean isExecutable (  )</A></B></CODE>
			<BR>
			<blockquote> Finds whether the file is executable. </blockquote>
		</TD>
	</TR>
	
	<!-- =========== Summary =========== -->
	<TR BGCOLOR='white' CLASS='TableRowColor'>
		<TD>
			<CODE><B><A HREF='File.html#isLink'>boolean isLink (  )</A></B></CODE>
			<BR>
			<blockquote> Finds whether the file is a symbolic link. </blockquote>
		</TD>
	</TR>
	
	<!-- =========== Summary =========== -->
	<TR BGCOLOR='white' CLASS='TableRowColor'>
		<TD>
			<CODE><B><A HREF='File.html#isLocked'>boolean isLocked (  )</A></B></CODE>
			<BR>
			<blockquote> Finds whether the file is locked. </blockquote>
		</TD>
	</TR>
	
	<!-- =========== Summary =========== -->
	<TR BGCOLOR='white' CLASS='TableRowColor'>
		<TD>
			<CODE><B><A HREF='File.html#isOpened'>boolean isOpened (  )</A></B></CODE>
			<BR>
			<blockquote> Finds whether the file is opened. </blockquote>
		</TD>
	</TR>
	
	<!-- =========== Summary =========== -->
	<TR BGCOLOR='white' CLASS='TableRowColor'>
		<TD>
			<CODE><B><A HREF='File.html#isReadable'>boolean isReadable (  )</A></B></CODE>
			<BR>
			<blockquote> Finds whether the file is readable. </blockquote>
		</TD>
	</TR>
	
	<!-- =========== Summary =========== -->
	<TR BGCOLOR='white' CLASS='TableRowColor'>
		<TD>
			<CODE><B><A HREF='File.html#isUploaded'>boolean isUploaded (  )</A></B></CODE>
			<BR>
			<blockquote> Finds whether the file was uploaded via HTTP POST. </blockquote>
		</TD>
	</TR>
	
	<!-- =========== Summary =========== -->
	<TR BGCOLOR='white' CLASS='TableRowColor'>
		<TD>
			<CODE><B><A HREF='File.html#isWriteable'>boolean isWriteable (  )</A></B></CODE>
			<BR>
			<blockquote> Finds whether the file is writeable. </blockquote>
		</TD>
	</TR>
	
	<!-- =========== Summary =========== -->
	<TR BGCOLOR='white' CLASS='TableRowColor'>
		<TD>
			<CODE><B><A HREF='File.html#lock'>mixed lock (  )</A></B></CODE>
			<BR>
			<blockquote> Attempts to lock access to the file. </blockquote>
		</TD>
	</TR>
	
	<!-- =========== Summary =========== -->
	<TR BGCOLOR='white' CLASS='TableRowColor'>
		<TD>
			<CODE><B><A HREF='File.html#open'>mixed open (  )</A></B></CODE>
			<BR>
			<blockquote> Opens the file. </blockquote>
		</TD>
	</TR>
	
	<!-- =========== Summary =========== -->
	<TR BGCOLOR='white' CLASS='TableRowColor'>
		<TD>
			<CODE><B><A HREF='File.html#read'>mixed read (  )</A></B></CODE>
			<BR>
			<blockquote> Read data from a file. </blockquote>
		</TD>
	</TR>
	
	<!-- =========== Summary =========== -->
	<TR BGCOLOR='white' CLASS='TableRowColor'>
		<TD>
			<CODE><B><A HREF='File.html#readBuffer'>mixed readBuffer ( &$buffer, [$length = 0] )</A></B></CODE>
			<BR>
			<blockquote> Read buffer from a file. </blockquote>
		</TD>
	</TR>
	
	<!-- =========== Summary =========== -->
	<TR BGCOLOR='white' CLASS='TableRowColor'>
		<TD>
			<CODE><B><A HREF='File.html#readLine'>mixed readLine (  )</A></B></CODE>
			<BR>
			<blockquote> Read a line of data from a file. </blockquote>
		</TD>
	</TR>
	
	<!-- =========== Summary =========== -->
	<TR BGCOLOR='white' CLASS='TableRowColor'>
		<TD>
			<CODE><B><A HREF='File.html#rename'>mixed rename ( $name )</A></B></CODE>
			<BR>
			<blockquote> Attempts to rename the file. </blockquote>
		</TD>
	</TR>
	
	<!-- =========== Summary =========== -->
	<TR BGCOLOR='white' CLASS='TableRowColor'>
		<TD>
			<CODE><B><A HREF='File.html#setBuffer'>mixed setBuffer ( $buffer )</A></B></CODE>
			<BR>
			<blockquote> Sets the file buffer size. </blockquote>
		</TD>
	</TR>
	
	<!-- =========== Summary =========== -->
	<TR BGCOLOR='white' CLASS='TableRowColor'>
		<TD>
			<CODE><B><A HREF='File.html#setMode'>mixed setMode ( $mode )</A></B></CODE>
			<BR>
			<blockquote> Sets the file access mode. </blockquote>
		</TD>
	</TR>
	
	<!-- =========== Summary =========== -->
	<TR BGCOLOR='white' CLASS='TableRowColor'>
		<TD>
			<CODE><B><A HREF='File.html#unlock'>mixed unlock (  )</A></B></CODE>
			<BR>
			<blockquote> Attempts to unlock access to the file. </blockquote>
		</TD>
	</TR>
	
	<!-- =========== Summary =========== -->
	<TR BGCOLOR='white' CLASS='TableRowColor'>
		<TD>
			<CODE><B><A HREF='File.html#write'>mixed write ( $string )</A></B></CODE>
			<BR>
			<blockquote> Write data to a file. </blockquote>
		</TD>
	</TR>
	
	<!-- =========== Summary =========== -->
	<TR BGCOLOR='white' CLASS='TableRowColor'>
		<TD>
			<CODE><B><A HREF='File.html#writeBuffer'>mixed writeBuffer ( &$buffer, [$length = 0] )</A></B></CODE>
			<BR>
			<blockquote> Write buffer to a file. </blockquote>
		</TD>
	</TR>
	
	<!-- =========== Summary =========== -->
	<TR BGCOLOR='white' CLASS='TableRowColor'>
		<TD>
			<CODE><B><A HREF='File.html#writeLine'>mixed writeLine ( $string )</A></B></CODE>
			<BR>
			<blockquote> Write a line of data to a file. </blockquote>
		</TD>
	</TR>
	
</TABLE>

<hbr>
<!-- ============ VARIABLE DETAIL =========== -->

<A NAME='variable_detail'></A>
<TABLE BORDER='1' CELLPADDING='3' CELLSPACING='0' WIDTH='100%'>
	<TR BGCOLOR='#CCCCFF' CLASS='TableHeadingColor'>
		<TD>
			<FONT SIZE='+2'><B>Variable Detail</B></FONT>
		</TD>
	</TR>
</TABLE>


<A NAME='$_backup'><!-- --></A><H3>$_backup</H3>
<b>Data type:</b> boolean<br>
<!-- ========== Info from phpDoc block ========= -->
<b>Indicates whether works on orginal file or its copy.</b>
<pre>

</pre>
<UL>
	
	<LI><b>Access</b> - <CODE>private</CODE></LI>
	
</UL>

<HR>

<A NAME='$_buffer'><!-- --></A><H3>$_buffer</H3>
<b>Data type:</b> int<br>
<!-- ========== Info from phpDoc block ========= -->
<b>Number of bytes to read and write at IO operations.</b>
<pre>

</pre>
<UL>
	
	<LI><b>Access</b> - <CODE>private</CODE></LI>
	
</UL>

<HR>

<A NAME='$_handle'><!-- --></A><H3>$_handle</H3>
<b>Data type:</b> mixed<br>
<!-- ========== Info from phpDoc block ========= -->
<b>File handle.</b>
<pre>

</pre>
<UL>
	
	<LI><b>Access</b> - <CODE>private</CODE></LI>
	
</UL>

<HR>

<A NAME='$_locked'><!-- --></A><H3>$_locked</H3>
<b>Data type:</b> boolean<br>
<!-- ========== Info from phpDoc block ========= -->
<b>Indicates whether the file is locked or not.</b>
<pre>

</pre>
<UL>
	
	<LI><b>Access</b> - <CODE>private</CODE></LI>
	
</UL>

<HR>

<A NAME='$_mode'><!-- --></A><H3>$_mode</H3>
<b>Data type:</b> string<br>
<!-- ========== Info from phpDoc block ========= -->
<b>File access mode.</b>
<pre>

</pre>
<UL>
	
	<LI><b>Access</b> - <CODE>private</CODE></LI>
	
</UL>

<HR>

<A NAME='$_name'><!-- --></A><H3>$_name</H3>
<b>Data type:</b> string<br>
<!-- ========== Info from phpDoc block ========= -->
<b>Path to file or file name.</b>
<pre>

</pre>
<UL>
	
	<LI><b>Access</b> - <CODE>private</CODE></LI>
	
</UL>

<HR>

<A NAME='$_temp'><!-- --></A><H3>$_temp</H3>
<b>Data type:</b> string<br>
<!-- ========== Info from phpDoc block ========= -->
<b>Temporary file name when working with copy of the file.</b>
<pre>

</pre>
<UL>
	
	<LI><b>Access</b> - <CODE>private</CODE></LI>
	
</UL>

<HR>


<hr>
<!-- ============ FUNCTION DETAIL =========== -->

<A NAME='function_detail'></A>
<TABLE BORDER='1' CELLPADDING='3' CELLSPACING='0' WIDTH='100%'>
	<TR BGCOLOR='#CCCCFF' CLASS='TableHeadingColor'>
		<TD>
			<FONT SIZE='+2'><B>Method Detail</B></FONT>
		</TD>
	</TR>
</TABLE>


<A NAME='constructor File'><!-- --></A><H3>constructor File</H3>
<P><B>void constructor File ( [$name = ''], [$mode = 'r'], [$backup = 'r'false'r'], [$buffer = 'r'1024'r'] )</B></P>
<P></P>
<!-- ========== Info from phpDoc block ========= -->
<b>File class constructor.</b>
<pre>
Creates the new instance of File class and sets up basic properties.
</pre>
<DL>
	<DT>Function Parameters:</DT>
	
	<DD><CODE>- <i>string $name</i>: the path to file or file name, defaults to "".</CODE></DD>
	
	<DD><CODE>- <i>string $mode</i>: the access mode to file stream, defaults to "r".</CODE></DD>
	
	<DD><CODE>- <i>boolean $backup</i>: indicates whether works with orginal file or its copy.</CODE></DD>
	
	<DD><CODE>- <i>boolean $buffer</i>: the number of bytes to read and write at IO operations.</CODE></DD>
	

	<DT>Function Info:</DT>
	
	<DD><b>Access</b> - <CODE>public</CODE></DD>
	
</DL>

<HR>

<A NAME='chmod'><!-- --></A><H3>chmod</H3>
<P><B>mixed chmod ( [$mode = 0644] )</B></P>
<P></P>
<!-- ========== Info from phpDoc block ========= -->
<b>Attempts to change the mode of the file.</b>
<pre>
Returns true on success or error object with an error message on any
 kind of failure. Note that mode is not automatically assumed to be an
 octal value. To ensure the expected operation, you need to prefix mode
 with a zero (0):
</pre>
<DL>
	<DT>Function Parameters:</DT>
	
	<DD><CODE>- <i>int $mode</i>: the access permissions, defaults to 0644.</CODE></DD>
	

	<DT>Function Info:</DT>
	
	<DD><b>Access</b> - <CODE>public</CODE></DD>
	
</DL>

<HR>

<A NAME='close'><!-- --></A><H3>close</H3>
<P><B>mixed close (  )</B></P>
<P></P>
<!-- ========== Info from phpDoc block ========= -->
<b>Closes the file.</b>
<pre>
If called when the file is closed or it couldn't be closed,
 it returns error object, otherwise it returns true.
</pre>
<DL>
	<DT>Function Parameters:</DT>
	

	<DT>Function Info:</DT>
	
	<DD><b>Access</b> - <CODE>public</CODE></DD>
	
</DL>

<HR>

<A NAME='copy'><!-- --></A><H3>copy</H3>
<P><B>mixed copy ( $destination, [$mode = 0644] )</B></P>
<P></P>
<!-- ========== Info from phpDoc block ========= -->
<b>Attempts to copy the file.</b>
<pre>
Returns true on success or error object with an error message on any
 kind of failure. File is copied to specified destination and access
 permissions are changed according to the mode param. Note that mode is
 not automatically assumed to be an octal value. To ensure the expected
 operation, you need to prefix mode with a zero (0):
</pre>
<DL>
	<DT>Function Parameters:</DT>
	
	<DD><CODE>- <i>string $destination</i>: the new file name.</CODE></DD>
	
	<DD><CODE>- <i>int $mode</i>: the access permissions, defaults to 0644.</CODE></DD>
	

	<DT>Function Info:</DT>
	
	<DD><b>Access</b> - <CODE>public</CODE></DD>
	
</DL>

<HR>

<A NAME='delete'><!-- --></A><H3>delete</H3>
<P><B>mixed delete (  )</B></P>
<P></P>
<!-- ========== Info from phpDoc block ========= -->
<b>Attempts to delete the file.</b>
<pre>
If called when the file is already opened, it returns error object
 otherwise it returns true on success or error object with an error
 message on any kind of failure.
</pre>
<DL>
	<DT>Function Parameters:</DT>
	

	<DT>Function Info:</DT>
	
	<DD><b>Access</b> - <CODE>public</CODE></DD>
	
</DL>

<HR>

<A NAME='exists'><!-- --></A><H3>exists</H3>
<P><B>boolean exists (  )</B></P>
<P></P>
<!-- ========== Info from phpDoc block ========= -->
<b>Checks whether a file exists.</b>
<pre>
Returns true if the file exists, false otherwise.
</pre>
<DL>
	<DT>Function Parameters:</DT>
	

	<DT>Function Info:</DT>
	
	<DD><b>Access</b> - <CODE>public</CODE></DD>
	
</DL>

<HR>

<A NAME='getATime'><!-- --></A><H3>getATime</H3>
<P><B>int getATime (  )</B></P>
<P></P>
<!-- ========== Info from phpDoc block ========= -->
<b>Gets the time the file was last accessed.</b>
<pre>
If called when the file does not exists it returns error object, otherwise
 it returns the time the file was last accessed. The time is returned as
 a Unix timestamp.
</pre>
<DL>
	<DT>Function Parameters:</DT>
	

	<DT>Function Info:</DT>
	
	<DD><b>Access</b> - <CODE>public</CODE></DD>
	
</DL>

<HR>

<A NAME='getBuffer'><!-- --></A><H3>getBuffer</H3>
<P><B>int getBuffer (  )</B></P>
<P></P>
<!-- ========== Info from phpDoc block ========= -->
<b>Gets the file buffer size.</b>
<pre>
Returns number of bytes used at file IO operations.
</pre>
<DL>
	<DT>Function Parameters:</DT>
	

	<DT>Function Info:</DT>
	
	<DD><b>Access</b> - <CODE>public</CODE></DD>
	
</DL>

<HR>

<A NAME='getCTime'><!-- --></A><H3>getCTime</H3>
<P><B>int getCTime (  )</B></P>
<P></P>
<!-- ========== Info from phpDoc block ========= -->
<b>Gets the time the file was last changed.</b>
<pre>
If called when the file does not exists it returns error object, otherwise
 it returns the time the file was last changed. The time is returned as
 a Unix timestamp.
</pre>
<DL>
	<DT>Function Parameters:</DT>
	

	<DT>Function Info:</DT>
	
	<DD><b>Access</b> - <CODE>public</CODE></DD>
	
</DL>

<HR>

<A NAME='getGroup'><!-- --></A><H3>getGroup</H3>
<P><B>mixed getGroup (  )</B></P>
<P></P>
<!-- ========== Info from phpDoc block ========= -->
<b>Gets the group ID of the owner of the file.</b>
<pre>
If called when the file does not exists it returns error object, otherwise
 it returns the group ID of the owner of the file in numerical format.
</pre>
<DL>
	<DT>Function Parameters:</DT>
	

	<DT>Function Info:</DT>
	
	<DD><b>Access</b> - <CODE>public</CODE></DD>
	
</DL>

<HR>

<A NAME='getHandle'><!-- --></A><H3>getHandle</H3>
<P><B>mixed getHandle (  )</B></P>
<P></P>
<!-- ========== Info from phpDoc block ========= -->
<b>Gets the file handle.</b>
<pre>
Returns resource handle if the file is opened, null otherwise.
</pre>
<DL>
	<DT>Function Parameters:</DT>
	

	<DT>Function Info:</DT>
	
	<DD><b>Access</b> - <CODE>public</CODE></DD>
	
</DL>

<HR>

<A NAME='getMode'><!-- --></A><H3>getMode</H3>
<P><B>mixed getMode (  )</B></P>
<P></P>
<!-- ========== Info from phpDoc block ========= -->
<b>Gets the file access mode.</b>
<pre>
Returns file access mode.
</pre>
<DL>
	<DT>Function Parameters:</DT>
	

	<DT>Function Info:</DT>
	
	<DD><b>Access</b> - <CODE>public</CODE></DD>
	
</DL>

<HR>

<A NAME='getMTime'><!-- --></A><H3>getMTime</H3>
<P><B>int getMTime (  )</B></P>
<P></P>
<!-- ========== Info from phpDoc block ========= -->
<b>Gets the time the file was last modified.</b>
<pre>
If called when the file does not exists it returns error object, otherwise
 it returns the time the file was last modified. The time is returned as
 a Unix timestamp.
</pre>
<DL>
	<DT>Function Parameters:</DT>
	

	<DT>Function Info:</DT>
	
	<DD><b>Access</b> - <CODE>public</CODE></DD>
	
</DL>

<HR>

<A NAME='getName'><!-- --></A><H3>getName</H3>
<P><B>string getName (  )</B></P>
<P></P>
<!-- ========== Info from phpDoc block ========= -->
<b>Gets path to file or file name.</b>
<pre>
Returns path to file or file name or empty string if it has not been set
 in object constructor.
</pre>
<DL>
	<DT>Function Parameters:</DT>
	

	<DT>Function Info:</DT>
	
	<DD><b>Access</b> - <CODE>public</CODE></DD>
	
</DL>

<HR>

<A NAME='getOwner'><!-- --></A><H3>getOwner</H3>
<P><B>mixed getOwner (  )</B></P>
<P></P>
<!-- ========== Info from phpDoc block ========= -->
<b>Gets the user ID of the owner of the file.</b>
<pre>
If called when the file does not exists it returns error object, otherwise
 it returns the user ID of the owner of the file in numerical format.
</pre>
<DL>
	<DT>Function Parameters:</DT>
	

	<DT>Function Info:</DT>
	
	<DD><b>Access</b> - <CODE>public</CODE></DD>
	
</DL>

<HR>

<A NAME='getSize'><!-- --></A><H3>getSize</H3>
<P><B>mixed getSize (  )</B></P>
<P></P>
<!-- ========== Info from phpDoc block ========= -->
<b>Gets the size of the file in bytes.</b>
<pre>
Returns the size of the file in bytes if the file exists, error object otherwise.
</pre>
<DL>
	<DT>Function Parameters:</DT>
	

	<DT>Function Info:</DT>
	
	<DD><b>Access</b> - <CODE>public</CODE></DD>
	
</DL>

<HR>

<A NAME='isEof'><!-- --></A><H3>isEof</H3>
<P><B>boolean isEof (  )</B></P>
<P></P>
<!-- ========== Info from phpDoc block ========= -->
<b>Finds whether the file is at end-of-file or closed.</b>
<pre>
Returns true if the file is closed or the file is at end-of-file,
 false otherwise.
</pre>
<DL>
	<DT>Function Parameters:</DT>
	

	<DT>Function Info:</DT>
	
	<DD><b>Access</b> - <CODE>public</CODE></DD>
	
</DL>

<HR>

<A NAME='isExecutable'><!-- --></A><H3>isExecutable</H3>
<P><B>boolean isExecutable (  )</B></P>
<P></P>
<!-- ========== Info from phpDoc block ========= -->
<b>Finds whether the file is executable.</b>
<pre>
Returns true if the file exists and is executable, false otherwise.
</pre>
<DL>
	<DT>Function Parameters:</DT>
	

	<DT>Function Info:</DT>
	
	<DD><b>Access</b> - <CODE>public</CODE></DD>
	
</DL>

<HR>

<A NAME='isLink'><!-- --></A><H3>isLink</H3>
<P><B>boolean isLink (  )</B></P>
<P></P>
<!-- ========== Info from phpDoc block ========= -->
<b>Finds whether the file is a symbolic link.</b>
<pre>
Returns true if the file exists and is a symbolic link, false otherwise.
</pre>
<DL>
	<DT>Function Parameters:</DT>
	

	<DT>Function Info:</DT>
	
	<DD><b>Access</b> - <CODE>public</CODE></DD>
	
</DL>

<HR>

<A NAME='isLocked'><!-- --></A><H3>isLocked</H3>
<P><B>boolean isLocked (  )</B></P>
<P></P>
<!-- ========== Info from phpDoc block ========= -->
<b>Finds whether the file is locked.</b>
<pre>
Returns true if the file is locked, false otherwise.
</pre>
<DL>
	<DT>Function Parameters:</DT>
	

	<DT>Function Info:</DT>
	
	<DD><b>Access</b> - <CODE>public</CODE></DD>
	
</DL>

<HR>

<A NAME='isOpened'><!-- --></A><H3>isOpened</H3>
<P><B>boolean isOpened (  )</B></P>
<P></P>
<!-- ========== Info from phpDoc block ========= -->
<b>Finds whether the file is opened.</b>
<pre>
Returns true if the file is opened, false otherwise.
</pre>
<DL>
	<DT>Function Parameters:</DT>
	

	<DT>Function Info:</DT>
	
	<DD><b>Access</b> - <CODE>public</CODE></DD>
	
</DL>

<HR>

<A NAME='isReadable'><!-- --></A><H3>isReadable</H3>
<P><B>boolean isReadable (  )</B></P>
<P></P>
<!-- ========== Info from phpDoc block ========= -->
<b>Finds whether the file is readable.</b>
<pre>
Returns true if the file exists and is readable, false otherwise.
</pre>
<DL>
	<DT>Function Parameters:</DT>
	

	<DT>Function Info:</DT>
	
	<DD><b>Access</b> - <CODE>public</CODE></DD>
	
</DL>

<HR>

<A NAME='isUploaded'><!-- --></A><H3>isUploaded</H3>
<P><B>boolean isUploaded (  )</B></P>
<P></P>
<!-- ========== Info from phpDoc block ========= -->
<b>Finds whether the file was uploaded via HTTP POST.</b>
<pre>
Returns true if the file was uploaded via HTTP POST, false otherwise.
</pre>
<DL>
	<DT>Function Parameters:</DT>
	

	<DT>Function Info:</DT>
	
	<DD><b>Access</b> - <CODE>public</CODE></DD>
	
</DL>

<HR>

<A NAME='isWriteable'><!-- --></A><H3>isWriteable</H3>
<P><B>boolean isWriteable (  )</B></P>
<P></P>
<!-- ========== Info from phpDoc block ========= -->
<b>Finds whether the file is writeable.</b>
<pre>
Returns true if the file exists and is writeable, false otherwise.
</pre>
<DL>
	<DT>Function Parameters:</DT>
	

	<DT>Function Info:</DT>
	
	<DD><b>Access</b> - <CODE>public</CODE></DD>
	
</DL>

<HR>

<A NAME='lock'><!-- --></A><H3>lock</H3>
<P><B>mixed lock (  )</B></P>
<P></P>
<!-- ========== Info from phpDoc block ========= -->
<b>Attempts to lock access to the file.</b>
<pre>
Returns true on success or error object with an error message on any
 kind of failure.
</pre>
<DL>
	<DT>Function Parameters:</DT>
	

	<DT>Function Info:</DT>
	
	<DD><b>Access</b> - <CODE>public</CODE></DD>
	
</DL>

<HR>

<A NAME='open'><!-- --></A><H3>open</H3>
<P><B>mixed open (  )</B></P>
<P></P>
<!-- ========== Info from phpDoc block ========= -->
<b>Opens the file.</b>
<pre>
If called when the the file is already opened, it returns error
 object otherwise it will try to open a file stream and returns true.
 The file must be accessible to PHP, so you need to ensure that the file
 access permissions allow this access. Type of access to the stream is
 controled by the mode property.
</pre>
<DL>
	<DT>Function Parameters:</DT>
	

	<DT>Function Info:</DT>
	
	<DD><b>Access</b> - <CODE>public</CODE></DD>
	
</DL>

<HR>

<A NAME='read'><!-- --></A><H3>read</H3>
<P><B>mixed read (  )</B></P>
<P></P>
<!-- ========== Info from phpDoc block ========= -->
<b>Read data from a file.</b>
<pre>
Reads up to the file buffer size from the opened file. Reading stops when
 the file buffer size have been read or end-of-file reached, whichever
 comes first. If called when the file is closed, it returns error object
 otherwise it returns fread() result.
</pre>
<DL>
	<DT>Function Parameters:</DT>
	

	<DT>Function Info:</DT>
	
	<DD><b>Access</b> - <CODE>public</CODE></DD>
	
</DL>

<HR>

<A NAME='readBuffer'><!-- --></A><H3>readBuffer</H3>
<P><B>mixed readBuffer ( &$buffer, [$length = 0] )</B></P>
<P></P>
<!-- ========== Info from phpDoc block ========= -->
<b>Read buffer from a file.</b>
<pre>
Reads up to the specified buffer size from the opened file. Reading
 stops when the specified buffer size have been read or end-of-stream
 reached, whichever comes first. If called when the file is closed,
 it returns error object otherwise it returns fread() result.
</pre>
<DL>
	<DT>Function Parameters:</DT>
	
	<DD><CODE>- <i>string $buffer</i>: the data to read.</CODE></DD>
	
	<DD><CODE>- <i>int $length</i>: the buffer length, defaults to 0.</CODE></DD>
	

	<DT>Function Info:</DT>
	
	<DD><b>Access</b> - <CODE>public</CODE></DD>
	
</DL>

<HR>

<A NAME='readLine'><!-- --></A><H3>readLine</H3>
<P><B>mixed readLine (  )</B></P>
<P></P>
<!-- ========== Info from phpDoc block ========= -->
<b>Read a line of data from a file.</b>
<pre>
Read until either the end of the file or a newline, whichever comes
 first. If called when the file is closed, it returns error object
 otherwise it returns all available data up to a newline, without
 that newline, or until the end of the file as string.
</pre>
<DL>
	<DT>Function Parameters:</DT>
	

	<DT>Function Info:</DT>
	
	<DD><b>Access</b> - <CODE>public</CODE></DD>
	
</DL>

<HR>

<A NAME='rename'><!-- --></A><H3>rename</H3>
<P><B>mixed rename ( $name )</B></P>
<P></P>
<!-- ========== Info from phpDoc block ========= -->
<b>Attempts to rename the file.</b>
<pre>
Returns true on success or error object with an error message on any
 kind of failure.
</pre>
<DL>
	<DT>Function Parameters:</DT>
	
	<DD><CODE>- <i>string $name</i>: the new file name.</CODE></DD>
	

	<DT>Function Info:</DT>
	
	<DD><b>Access</b> - <CODE>public</CODE></DD>
	
</DL>

<HR>

<A NAME='setBuffer'><!-- --></A><H3>setBuffer</H3>
<P><B>mixed setBuffer ( $buffer )</B></P>
<P></P>
<!-- ========== Info from phpDoc block ========= -->
<b>Sets the file buffer size.</b>
<pre>
Returns true on success or a error object if the buffer size is not a
 valid integer value.
</pre>
<DL>
	<DT>Function Parameters:</DT>
	

	<DT>Function Info:</DT>
	
	<DD><b>Access</b> - <CODE>public</CODE></DD>
	
</DL>

<HR>

<A NAME='setMode'><!-- --></A><H3>setMode</H3>
<P><B>mixed setMode ( $mode )</B></P>
<P></P>
<!-- ========== Info from phpDoc block ========= -->
<b>Sets the file access mode.</b>
<pre>
The mode specifies the type of access you require to the file stream.
 If called when the file is opened, it returns error object otherwise it
 returns true on success.
</pre>
<DL>
	<DT>Function Parameters:</DT>
	

	<DT>Function Info:</DT>
	
	<DD><b>Access</b> - <CODE>public</CODE></DD>
	
</DL>

<HR>

<A NAME='unlock'><!-- --></A><H3>unlock</H3>
<P><B>mixed unlock (  )</B></P>
<P></P>
<!-- ========== Info from phpDoc block ========= -->
<b>Attempts to unlock access to the file.</b>
<pre>
Returns true on success or error object with an error message on any
 kind of failure.
</pre>
<DL>
	<DT>Function Parameters:</DT>
	

	<DT>Function Info:</DT>
	
	<DD><b>Access</b> - <CODE>public</CODE></DD>
	
</DL>

<HR>

<A NAME='write'><!-- --></A><H3>write</H3>
<P><B>mixed write ( $string )</B></P>
<P></P>
<!-- ========== Info from phpDoc block ========= -->
<b>Write data to a file.</b>
<pre>
Write data to a file. Writing will stop after file buffer
 length bytes have been written or the end of string is reached, whichever
 comes first. If called when the file is closed, it returns error object
 otherwise it returns fwrite() result.
</pre>
<DL>
	<DT>Function Parameters:</DT>
	
	<DD><CODE>- <i>string $string</i>: the data to write.</CODE></DD>
	

	<DT>Function Info:</DT>
	
	<DD><b>Access</b> - <CODE>public</CODE></DD>
	
</DL>

<HR>

<A NAME='writeBuffer'><!-- --></A><H3>writeBuffer</H3>
<P><B>mixed writeBuffer ( &$buffer, [$length = 0] )</B></P>
<P></P>
<!-- ========== Info from phpDoc block ========= -->
<b>Write buffer to a file.</b>
<pre>
Write data to a opened file. Writing will stop after specified buffer
 length bytes have been written or the end of string is reached, whichever
 comes first. If called when the file is closed, it returns error object
 otherwise it returns fwrite() result.
</pre>
<DL>
	<DT>Function Parameters:</DT>
	
	<DD><CODE>- <i>string $buffer</i>: the data to write.</CODE></DD>
	
	<DD><CODE>- <i>int $length</i>: the buffer length, defaults to 0.</CODE></DD>
	

	<DT>Function Info:</DT>
	
	<DD><b>Access</b> - <CODE>public</CODE></DD>
	
</DL>

<HR>

<A NAME='writeLine'><!-- --></A><H3>writeLine</H3>
<P><B>mixed writeLine ( $string )</B></P>
<P></P>
<!-- ========== Info from phpDoc block ========= -->
<b>Write a line of data to a file.</b>
<pre>
Write a line of data to the opened file, followed by a trailing &quot;\r\n&quot;.
 If called when the file is closed, it returns error object
 otherwise it returns fputs result.
</pre>
<DL>
	<DT>Function Parameters:</DT>
	
	<DD><CODE>- <i>string $string</i>: the data to write.</CODE></DD>
	

	<DT>Function Info:</DT>
	
	<DD><b>Access</b> - <CODE>public</CODE></DD>
	
</DL>

<HR>


<hr>
</HTML>
Return current item: XS PHP Library