<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://wiki.spherecommunity.net/index.php?action=history&amp;feed=atom&amp;title=Files</id>
		<title>Files - Revision history</title>
		<link rel="self" type="application/atom+xml" href="https://wiki.spherecommunity.net/index.php?action=history&amp;feed=atom&amp;title=Files"/>
		<link rel="alternate" type="text/html" href="https://wiki.spherecommunity.net/index.php?title=Files&amp;action=history"/>
		<updated>2026-04-16T23:41:41Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.28.0</generator>

	<entry>
		<id>https://wiki.spherecommunity.net/index.php?title=Files&amp;diff=198&amp;oldid=prev</id>
		<title>MrSugarCube: Created page with '__FORCETOC__ Using the FILE object reference, scripts can interact with text files. The following table details the various properties of the file object in SphereServer:   '...'</title>
		<link rel="alternate" type="text/html" href="https://wiki.spherecommunity.net/index.php?title=Files&amp;diff=198&amp;oldid=prev"/>
				<updated>2009-06-07T16:28:31Z</updated>
		
		<summary type="html">&lt;p&gt;Created page with &amp;#039;__FORCETOC__ Using the &lt;a href=&quot;/index.php?title=FILE&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;FILE (page does not exist)&quot;&gt;FILE&lt;/a&gt; object reference, scripts can interact with text files. The following table details the various properties of the file object in SphereServer:   &amp;#039;...&amp;#039;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;__FORCETOC__&lt;br /&gt;
Using the [[FILE]] object reference, scripts can interact with text files. The following table details the various properties of the file object in SphereServer:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Note:''' Before the FILE object can be used, the OF_FileCommands flag must be set in Sphere.ini's OptionFlags setting.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Properties and Functions==&lt;br /&gt;
Here is a list of all file properties and functions. If a function is marked as readable then it can return a value when used as &amp;lt;KEY&amp;gt;. Click on the name for more detailed information such as usage and examples.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;4&amp;quot; cellpadding=&amp;quot;4&amp;quot;&lt;br /&gt;
| '''Name''' || '''Read/Write''' || '''Description'''&lt;br /&gt;
|-&lt;br /&gt;
| [[CLOSE]] || W || Closes the currently open file.&lt;br /&gt;
|-&lt;br /&gt;
| [[DELETEFILE]] ''file_name'' || W || Deletes ''file_name''.&lt;br /&gt;
|-&lt;br /&gt;
| [[FILEEXIST]] ''file_name'' || R || Returns 1 if ''file_name'' exists.&lt;br /&gt;
|-&lt;br /&gt;
| [[FILELINES]] ''file_name'' || R || Returns the total number of lines in ''file_name''.&lt;br /&gt;
|-&lt;br /&gt;
| [[FILEPATH]] || R || Returns the name of the currently open file.&lt;br /&gt;
|-&lt;br /&gt;
| [[FLUSH]] || W || Forces all buffered output to be written to the file,&lt;br /&gt;
|-&lt;br /&gt;
| [[INUSE]] || R || Returns 1 if a file is currently open.&lt;br /&gt;
|-&lt;br /&gt;
| [[ISEOF]] || R || Returns 1 if there are no more lines left to read from the file.&lt;br /&gt;
|-&lt;br /&gt;
| [[LENGTH]] || R || Returns the total length of the currently open file, in bytes.&lt;br /&gt;
|-&lt;br /&gt;
| [[MODE]].APPEND || RW || Gets or sets whether or not the file will be appended to when opened. Cannot be set after the file has been opened.&lt;br /&gt;
|-&lt;br /&gt;
| [[MODE]].CREATE || RW || Gets or sets whether or not the file will be created when opened. Cannot be set after the file has been opened.&lt;br /&gt;
|-&lt;br /&gt;
| [[MODE]].READLFLAG || RW || Gets or sets whether or not the file will be opened for reading from. Cannot be set after the file has been opened.&lt;br /&gt;
|-&lt;br /&gt;
| [[MODE]].WRITEFLAG || RW || Gets or sets whether or not the file will be opened for writing to. Cannot be set after the file has been opened.&lt;br /&gt;
|-&lt;br /&gt;
| [[MODE]].SETDEFAULT || W || Sets the mode to the default setting. Cannot be set after the file has been opened.&lt;br /&gt;
|-&lt;br /&gt;
| [[OPEN]] ''file_name'' || R || Opens a file, and returns 1 if the attempt was successful, using the set [[MODE]] flags.&lt;br /&gt;
|-&lt;br /&gt;
| [[POSITION]] || R || Gets the current position in the currently open file, in bytes.&lt;br /&gt;
|-&lt;br /&gt;
| [[READBYTE]] || R || Reads the next byte from the currently open file.&lt;br /&gt;
|-&lt;br /&gt;
| [[READCHAR]] || R || Reads the next character from the currently open file.&lt;br /&gt;
|-&lt;br /&gt;
| [[READLINE]] ''n'' || R || Reads the nth line from the currently open file (1-based). 0 Reads the last line.&lt;br /&gt;
|-&lt;br /&gt;
| [[SEEK]] ''position'' || R || Changes the current position in the currently open file to ''position''. Accepts &amp;quot;BEGIN&amp;quot; for the start of the file and &amp;quot;END&amp;quot; for the end of the file. Returns the new position in the file.&lt;br /&gt;
|-&lt;br /&gt;
| [[WRITE]] ''text'' || W || Writes ''text'' to the currently open file.&lt;br /&gt;
|-&lt;br /&gt;
| [[WRITECHR]] ''ascii_value'' || W || Writes a single character to the currently open file.&lt;br /&gt;
|-&lt;br /&gt;
| [[WRITELINE]] ''text'' || W || Writes ''text'' to the currently open file, with newline character(s) on the end.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[[Category: Reference Compendium]]&lt;br /&gt;
[[Category: Objects]]&lt;/div&gt;</summary>
		<author><name>MrSugarCube</name></author>	</entry>

	</feed>