<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="FeedCreator 1.8" -->
<?xml-stylesheet href="https://humanemulator.su/wiki/lib/exe/css.php?s=feed" type="text/css"?>
<rdf:RDF
    xmlns="http://purl.org/rss/1.0/"
    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
    xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
    xmlns:dc="http://purl.org/dc/elements/1.1/">
    <channel rdf:about="https://humanemulator.su/wiki/feed.php">
        <title>Human Emulator wiki en:objects:textfile:file_work</title>
        <description></description>
        <link>https://humanemulator.su/wiki/</link>
        <image rdf:resource="https://humanemulator.su/wiki///humanemulator.su/wiki/lib/tpl/dokuwiki/images/favicon.ico" />
       <dc:date>2026-09-28T17:46:23+00:00</dc:date>
        <items>
            <rdf:Seq>
                <rdf:li rdf:resource="https://humanemulator.su/wiki/doku.php?id=en:objects:textfile:file_work:add_string_to_file&amp;rev=1785959551&amp;do=diff"/>
                <rdf:li rdf:resource="https://humanemulator.su/wiki/doku.php?id=en:objects:textfile:file_work:delete_line_from_file&amp;rev=1785959552&amp;do=diff"/>
                <rdf:li rdf:resource="https://humanemulator.su/wiki/doku.php?id=en:objects:textfile:file_work:get_line_from_file&amp;rev=1785959553&amp;do=diff"/>
                <rdf:li rdf:resource="https://humanemulator.su/wiki/doku.php?id=en:objects:textfile:file_work:get_lines_from_file&amp;rev=1785959552&amp;do=diff"/>
                <rdf:li rdf:resource="https://humanemulator.su/wiki/doku.php?id=en:objects:textfile:file_work:read_file&amp;rev=1785959553&amp;do=diff"/>
                <rdf:li rdf:resource="https://humanemulator.su/wiki/doku.php?id=en:objects:textfile:file_work:set_string_to_file&amp;rev=1785959554&amp;do=diff"/>
                <rdf:li rdf:resource="https://humanemulator.su/wiki/doku.php?id=en:objects:textfile:file_work:write_file&amp;rev=1785959554&amp;do=diff"/>
            </rdf:Seq>
        </items>
    </channel>
    <image rdf:about="https://humanemulator.su/wiki///humanemulator.su/wiki/lib/tpl/dokuwiki/images/favicon.ico">
        <title>Human Emulator wiki</title>
        <link>https://humanemulator.su/wiki/</link>
        <url>https://humanemulator.su/wiki///humanemulator.su/wiki/lib/tpl/dokuwiki/images/favicon.ico</url>
    </image>
    <item rdf:about="https://humanemulator.su/wiki/doku.php?id=en:objects:textfile:file_work:add_string_to_file&amp;rev=1785959551&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2026-08-05T22:52:31+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>en:objects:textfile:file_work:add_string_to_file</title>
        <link>https://humanemulator.su/wiki/doku.php?id=en:objects:textfile:file_work:add_string_to_file&amp;rev=1785959551&amp;do=diff</link>
        <description>PHP example: 

&lt;?php $xhe_host = &quot;127.0.0.1:7010&quot;;

//connect the object to control the emulator, if not already connected
if(!isset($path))
   $path = &quot;../../../Templates/xweb_human_emulator.php&quot;;
require($path);

//Start
echo &quot;&lt;hr&gt; &lt;font color = blue&gt; textfile-&gt;&quot;.basename(__FILE__).&quot;&lt;/font&gt; &lt;hr&gt;&quot;;

//1
$file = &quot;test \ add_string.txt&quot;;
//$file = &quot;D: \ add_string.txt&quot;;
echo(&quot;1.Add lines to the file:  n  n&quot;);
for($i = 0; $i &lt;10; $i ++)
{
echo(&quot;Added line: line #&quot;.$i.&quot;:&quot;);
echo($textfile-&gt;add_stri…</description>
    </item>
    <item rdf:about="https://humanemulator.su/wiki/doku.php?id=en:objects:textfile:file_work:delete_line_from_file&amp;rev=1785959552&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2026-08-05T22:52:32+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>en:objects:textfile:file_work:delete_line_from_file</title>
        <link>https://humanemulator.su/wiki/doku.php?id=en:objects:textfile:file_work:delete_line_from_file&amp;rev=1785959552&amp;do=diff</link>
        <description>PHP example: 

&lt;?php $xhe_host = &quot;127.0.0.1:7016&quot;;

//connect the object to control the emulator, if not already connected
if(!isset($path))
   $path = &quot;../../../Templates/xweb_human_emulator.php&quot;;
require($path);

//Start
echo &quot;&lt;hr&gt; &lt;font color = blue&gt; textfile-&gt;&quot;.basename(__FILE__).&quot;&lt;/font&gt; &lt;hr&gt;&quot;;

//prepare files
$path = &quot;test \ test_delete.txt&quot;;
$file_os-&gt;delete($path);
$file_os-&gt;copy(&quot;test \ test_dedupe.txt&quot;, $path);

//1
echo(&quot;1.Get the number of lines in the file:&quot;);
echo $textfile-&gt;get_l…</description>
    </item>
    <item rdf:about="https://humanemulator.su/wiki/doku.php?id=en:objects:textfile:file_work:get_line_from_file&amp;rev=1785959553&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2026-08-05T22:52:33+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>en:objects:textfile:file_work:get_line_from_file</title>
        <link>https://humanemulator.su/wiki/doku.php?id=en:objects:textfile:file_work:get_line_from_file&amp;rev=1785959553&amp;do=diff</link>
        <description>PHP example: 



Python example: 

# Additional paths
import sys
sys.path.insert(0, &#039;../../../Templates PY/&#039;)

xhe_host = &quot;127.0.0.1:7011&quot;
from xweb_human_emulator import *

# Start
echo(&quot;&lt;hr&gt; &lt;font color = blue&gt; textfile.xxxxxxxxx &lt;/font&gt; &lt;hr&gt;&quot;)

# 1
echo(&quot;1.Get a random string from file: &lt;br&gt; &lt;br&gt;&quot;)
for i in range(0,4):
echo(textfile.get_line_from_file(&quot;test \ test_dedupe.txt&quot;, true, 0.60), &quot;&lt;br&gt;&quot;)

# 2
echo(&quot;&lt;br&gt; 2.Get the specified line from the file(line(line) numbering starts from 0):&quot;)
ec…</description>
    </item>
    <item rdf:about="https://humanemulator.su/wiki/doku.php?id=en:objects:textfile:file_work:get_lines_from_file&amp;rev=1785959552&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2026-08-05T22:52:32+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>en:objects:textfile:file_work:get_lines_from_file</title>
        <link>https://humanemulator.su/wiki/doku.php?id=en:objects:textfile:file_work:get_lines_from_file&amp;rev=1785959552&amp;do=diff</link>
        <description>PHP example: 

&lt;?php $xhe_host = &quot;127.0.0.1:7010&quot;;

//connect the object to control the emulator, if not already connected
if(!isset($path))
   $path = &quot;../../../Templates/xweb_human_emulator.php&quot;;
require($path);

//Start
echo &quot;&lt;hr&gt; &lt;font color = blue&gt; textfile-&gt;&quot;.basename(__FILE__).&quot;&lt;/font&gt; &lt;hr&gt;&quot;;

//1
echo(&quot;1.Get the given lines(5 lines, starting from 2) from the file(line(line) numbering starts from 0): &lt;br&gt; &lt;br&gt;&quot;);
echo($textfile-&gt;get_lines_from_file(&quot;test \ test_dedupe.txt&quot;, 2,5,60));

//e…</description>
    </item>
    <item rdf:about="https://humanemulator.su/wiki/doku.php?id=en:objects:textfile:file_work:read_file&amp;rev=1785959553&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2026-08-05T22:52:33+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>en:objects:textfile:file_work:read_file</title>
        <link>https://humanemulator.su/wiki/doku.php?id=en:objects:textfile:file_work:read_file&amp;rev=1785959553&amp;do=diff</link>
        <description>PHP example: 

&lt;?php $xhe_host = &quot;127.0.0.1:7010&quot;;

//connect the object to control the emulator, if not already connected
if(!isset($path))
   $path = &quot;../../../Templates/xweb_human_emulator.php&quot;;
require($path);

//Start
echo &quot;&lt;hr&gt; &lt;font color = blue&gt; textfile-&gt;&quot;.basename(__FILE__).&quot;&lt;/font&gt; &lt;hr&gt;&quot;;

//1
echo(&quot;1.Read file given file: &lt;br&gt; &lt;br&gt;&quot;);
echo($textfile-&gt;read_file(&quot;test \ test_count.txt&quot;, 60));

//end
echo &quot;&lt;hr&gt; &lt;br&gt;&quot;;

//Quit
$app-&gt;quit();
?&gt;</description>
    </item>
    <item rdf:about="https://humanemulator.su/wiki/doku.php?id=en:objects:textfile:file_work:set_string_to_file&amp;rev=1785959554&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2026-08-05T22:52:34+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>en:objects:textfile:file_work:set_string_to_file</title>
        <link>https://humanemulator.su/wiki/doku.php?id=en:objects:textfile:file_work:set_string_to_file&amp;rev=1785959554&amp;do=diff</link>
        <description>PHP example: 

&lt;?php $xhe_host = &quot;127.0.0.1:7010&quot;;

//connect the object to control the emulator, if not already connected
if(!isset($path))
   $path = &quot;../../../Templates/xweb_human_emulator.php&quot;;
require($path);

//Start
echo &quot;&lt;hr&gt; &lt;font color = blue&gt; textfile-&gt;&quot;.basename(__FILE__).&quot;&lt;/font&gt; &lt;hr&gt;&quot;;

$file = &quot;test \ test_insert.txt&quot;;
$file_os-&gt;delete($file);

//1
echo(&quot;1.Add lines to the beginning of the file file: &lt;br&gt; &lt;br&gt;&quot;);
for($i = 0; $i &lt;5; $i ++)
echo($textfile-&gt;set_string_to_file($file, …</description>
    </item>
    <item rdf:about="https://humanemulator.su/wiki/doku.php?id=en:objects:textfile:file_work:write_file&amp;rev=1785959554&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2026-08-05T22:52:34+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>en:objects:textfile:file_work:write_file</title>
        <link>https://humanemulator.su/wiki/doku.php?id=en:objects:textfile:file_work:write_file&amp;rev=1785959554&amp;do=diff</link>
        <description>PHP example: 

&lt;?php $xhe_host = &quot;127.0.0.1:7010&quot;;

//connect the object to control the emulator, if not already connected
if(!isset($path))
   $path = &quot;../../../Templates/xweb_human_emulator.php&quot;;
require($path);

//Start
echo &quot;&lt;hr&gt; &lt;font color = blue&gt; textfile-&gt;&quot;.basename(__FILE__).&quot;&lt;/font&gt; &lt;hr&gt;&quot;;

//1
echo(&quot;1.Let&#039;s write the line \u0022 127.0.0.1  &quot;to the TestWrite.txt file in the script directory:&quot;);
echo($textfile-&gt;write_file(&quot;test \ test_write.txt&quot;, &quot;127.0.0.1&quot;, 60));

//show the results
$…</description>
    </item>
</rdf:RDF>
