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_folder

Source Location: /common/lib/folder/KT_Folder.class.php

Class Overview


manipulate folders;


Author(s):

Methods



Class Details

[line 10]
manipulate folders;



Tags:

access:  public


[ Top ]


Class Methods


constructor KT_folder [line 30]

KT_folder KT_folder( )

Constructor. doing nothing



Tags:

access:  public


[ Top ]

method checkRights [line 41]

boolean checkRights( string $folder, string $right)

verify the rights on the given folder;



Tags:

return:  true if the right exists on the folder or false if not;
access:  public


Parameters:

string   $folder   the absolute path to the folder to be checked
string   $right   the right to be checked: read/write:

[ Top ]

method copyFolder [line 234]

nothing copyFolder( string $folder, string $parentFolder)

copy a folder



Tags:

access:  public


Parameters:

string   $folder   the path to the folder
string   $parentFolder   the parent of the copied folder

[ Top ]

method createFolder [line 138]

nothing createFolder( string $path)

create recursively the folder;



Tags:

access:  public


Parameters:

string   $path   the absolute path to the folder

[ Top ]

method deleteFolder [line 175]

nothing deleteFolder( string $folder)

delete recursively the folder;



Tags:

access:  public


Parameters:

string   $folder   the absolute path to the folder

[ Top ]

method getError [line 350]

array getError( )

Getter. return the errors setted.



Tags:

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


[ Top ]

method hasError [line 337]

boolean hasError( )

check if an error was setted.



Tags:

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


[ Top ]

method is_readable [line 68]

boolean is_readable( string $folder)

check if the given folder has read permissions;



Tags:

return:  true if it can be read or false otherwise;
access:  public


Parameters:

string   $folder   the folder name

[ Top ]

method is_writable [line 83]

boolean is_writable( string $folder)

check if the given folder has write permissions;



Tags:

return:  true if it can be write or false otherwise;
access:  public


Parameters:

string   $folder   the folder name

[ Top ]

method moveFolder [line 279]

nothing moveFolder( string $folder, string $parentFolder)

move a folder



Tags:

access:  public


Parameters:

string   $folder   the path to the folder
string   $parentFolder   the new parent of the folder

[ Top ]

method preparePath [line 299]

string preparePath( string $path)

replace the '/' with '\' for windows and '\' with '/' for linux;



Tags:

return:  the translated path;
access:  public


Parameters:

string   $path   the path

[ Top ]

method readFolder [line 106]

array readFolder( string $folder, [boolean $details = false])

read the content of the folder.



Tags:

return:  [array] - Returns: array with the listing of the folder/files, empty if error occured;
access:  public


Parameters:

string   $folder  
  • the absolute path to the folder
boolean   $details  
  • Will return in the array the size for each entry (0 size for any folder).

[ Top ]

method renameFolder [line 207]

nothing renameFolder( string $folder, string $oldName, string $newName)

rename a folder



Tags:

access:  public


Parameters:

string   $folder   the path to the folder
string   $oldName   old folder name
string   $newName   new folder name

[ Top ]



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