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


  function fystem($input1,$input2)
$input1 is added to data array as target_path(for both reading and writing)
   "    should be a valid path when reading files(can be copied/made when writing to file)
   "    can be copied from,$copy_source, before writing using $this->prep($string,$copy_source)
$input2 is added to data array as mode
   "    should be 'r' - read, 'w' - write, 'a' - append [add an + for opposite mode too] ie ['a+','r+','w+']

I wanted to mention a possible case of fustrating errors. If you are getting unexpected outputs from grabber() (unexpected file contents) this means that you are relying on this classes error codes to decide what mode to operate in. If you set $input2 to be 'r' you will open a file for writing in 'r+' mode which will truncate the file to zero bytes before writing. If you do not load a mode that allows you to read a file('a' or 'w') a plus('+') is added so read mode is supported by PHP. To read file, perform logic operationss and add data to end of file use $mode = 'a+';

  returns $this->data // NOTE content key is empty


  function prep($input1,$input2)
This function is not used for reading files only when writing to files
$input1 should be string to write to file. It's returned in the data array as content
$input2 should be the path/to/the/file that you want to copy(if file is non-existent)
   "    should be blank if you do not want to copy a file(ie if you need a blank document)
If the copy fails error code 303 is returned

  returns error code 303 || or data['content']


  function grabber($input)
$input must be 'read' or 'wryt' If you get the sentance "What Happened? Are you on Dr*gs?" appearing in your browser you need to properly load this function. If you keep reading "No Funny No Money...Prep up a String!" you did not run the prep function which is integral to any write to file request made by this script. The prep function{$this->prep('abcdef','')} saves the string(abcdef), which is to be written to file, to a class variable. If the file to be written too does not exist it will be copied from the second input for prep {example: $this->prep('abcdef','path/to/file.ext');} and then have the first input(abcdef) written to it.
ex 1 grabber('read'); // read to files
ex 2 $var='read';
ex 3 grabber('wryt'); // write to files
ex 4 $var='wryt';
I also included cute sentances when you encounter errors. I went over the meaning of the sentances and their numeric counterparts in error_codes.txt
Open file failed     err_code 222
Read File failed     err_code 202
Wryt mode not ready  err_code 001
File write failed    err_code 101
Unsupported mode     err_code 666 !! NOTE grabber() only recognizes two strings as supported inputs 'read' & 'wryt' if ANY other string is entered 666 is returned!!

  returns error codes || success code(13 for ('wryt') only) || file data ( for ('read') only

Return current item: F-ystem Support Module