Location: PHPKode > scripts > F-ystem Support Module > f-ystem-support-module/Read_Me.txt
	F-ystem Support Module V.1
	by Skorch at Skeazy Scripts http://phpmysql.12feetunder.com/
	Function Overview 

This class is meant to deal with files. It will dump and exit if you try to load a dir. The F-ystem Support Module V.1 is a developer's resource. It allows a scripter to read, and write to, files. If you are not developing a script and are looking for a complete scripte check out http://phpmysql.12feetunder.com/phpscripts.php This class is used primarily to write RSS, Atom or other various XML formats to file.

You agree to live with the consequences of your decisions. Help is a polite request away. That being said, do as you will with this script. I appreciate links and people knowing who wrote the script(by looking at your installtion of my web site feature) but if you want to delete them and customize this script Have Fun!

This class assumes that the directory structure exists(Get DirtyDirz otherwise). It will try to perm and copy files before writing. It will reperm them to their previous value before closing the file handle. 

	Installtion

1) Edit Fystem.settings.php (you know your full path right?)
2) Upload Fystem.class.php & Fystem.settings.php to the same folder.
3) Include/require Fystem.class.php on any page/script you want to have flat-file access

	function list

see function_reference.txt for a more detailed explanation of inputs/outputs
see function_usage.txt for a brief overview of each function


 example read file.txt (exists in root aka public_html)

<?php
$path='file.txt';
include('Fystem.class.php');
$file = new fystem('file.txt','r');
$contents = $file->grabber('read');

IF($contents !== 101){
echo $contents; // what was read from file
}ELSE
echo 'Error reading file';
?>

 example write 'this' to file.txt *!* Will try to create file.txt *!*
 You must set your file permissions by hand (666 for files 777 for dirs)
<?php
$path='file.txt';
include('Fystem.class.php');
$file = new fystem($path,'w'); // NULL can also be copy file from path
$file->prep('this',NULL);
$var = $file->grabber('wryt'};
IF($var == 13){
echo 'success';
}ELSE
echo 'failure';
?>

 read and write to file.txt
 You must set your file permissions by hand (666 for files 777 for dirs)
<?php
$path='file.txt';
include('Fystem.class.php');
$file = new fystem($path,'w+');
$contents = $file->grabber('read');

IF($contents !== 101){
echo $contents;
}ELSE
echo 'Read Error';

$file->prep('this',NULL);
$var = $file->grabber('wryt'};

IF($var == 13){
echo 'success!! partytime!!';
}ELSE
echo 'failure to write to file';
?>
Return current item: F-ystem Support Module