Transaction Engine 3 Application Programming Interface
[ class tree: Transaction Engine 3 Application Programming Interface ] [ index: Transaction Engine 3 Application Programming Interface ] [ all elements ]

Class: KT_file

Source Location: /common/lib/file/KT_File.class.php

Class Overview


Provides functionalities for handling files;


Author(s):

Methods



Class Details

[line 10]
Provides functionalities for handling files;



Tags:

access:  public


[ Top ]


Class Methods


constructor KT_file [line 28]

KT_file KT_file( )

Constructor. Doing nothing.



[ Top ]

method copyFile [line 164]

boolean copyFile( string $file, mixed $newfile, string $mode, string $from)

Constructor. Sets the connection.



Tags:

return:  true if it has the right, false otherwise;
access:  public


Parameters:

string   $file   the folder to be checked;
string   $mode   what to test: read or write;
string   $from   from what class is the call;

[ Top ]

method createFile [line 96]

nothing; createFile( string $file)

Create an empty file;



Tags:

access:  public


Parameters:

string   $file   the path of the file to be created;

[ Top ]

method deleteFile [line 116]

nothing; deleteFile( string $file)

Delete a file;



Tags:

access:  public


Parameters:

string   $file   the path of the file to be deleted;

[ Top ]

method getError [line 280]

array getError( )

Getter. return the errors setted.



Tags:

return:  array - 0=>error for user, 1=>error for developer;
access:  public


[ Top ]

method getFolder [line 224]

void getFolder( string $file)

getter. return the folder from a file path with the correct directory separator



Tags:

access:  public


Parameters:

string   $file   the path to the file return string

[ Top ]

method hasError [line 267]

boolean hasError( )

check if an error was setted.



Tags:

return:  true if error is set or false if not;
access:  public


[ Top ]

method readFile [line 38]

string readFile( string $file)

Read and return the content of the given file;



Tags:

return:  nothing or the content of the file;
access:  public


Parameters:

string   $file   the path to the file to be read;

[ Top ]

method renameFile [line 134]

nothing; renameFile( string $file, string $newfile)

Rename a file;



Tags:

access:  public


Parameters:

string   $file   file to be renamed;
string   $newfile   final name of the file;

[ Top ]

method writeFile [line 61]

nothing; writeFile( string $file, string $mode, string $content)

Write the content to the given file;



Tags:

access:  public


Parameters:

string   $file   the path to the file to be read;
string   $mode   has value: truncate, prepend, append
string   $content   the content to be written;

[ Top ]



Documentation generated on Tue, 6 Dec 2005 15:11:29 +0200 by phpDocumentor 1.3.0RC3