ILIAS  Release_4_0_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilFileDataImport Class Reference

This class handles all operations on files for the exercise object. More...

+ Inheritance diagram for ilFileDataImport:
+ Collaboration diagram for ilFileDataImport:

Public Member Functions

 ilFileDataImport ()
 Constructor call base constructors checks if directory is writable and sets the optional obj_id.
 getPath ()
 get exercise path public
 __checkPath ()
 __checkReadWrite ()
 check if directory is writable overwritten method from base class private
- Public Member Functions inherited from ilFileData
 ilFileData ()
 Constructor class bas constructor and read path of directory from ilias.ini setup an mail object public.
 checkPath ($a_path)
 check if path exists and is writable
- Public Member Functions inherited from ilFile
 ilFile ()
 Constructor get ilias object public.
 deleteTrailingSlash ($a_path)
 delete trailing slash of path variables

Static Public Member Functions

 _initDirectory ()
 init directory overwritten method public

Data Fields

 $import_path

Detailed Description

This class handles all operations on files for the exercise object.

Author
Stefan Meyer smeye.nosp@m.r@da.nosp@m.tabay.nosp@m..de
Version
Id:
class.ilFileDataImport.php 20150 2009-06-08 18:02:33Z akill

Id$

Definition at line 14 of file class.ilFileDataImport.php.

Member Function Documentation

ilFileDataImport::__checkPath ( )

Definition at line 52 of file class.ilFileDataImport.php.

References __checkReadWrite(), and getPath().

{
if(!@file_exists($this->getPath()))
{
return false;
}
$this->__checkReadWrite();
return true;
}

+ Here is the call graph for this function:

ilFileDataImport::__checkReadWrite ( )

check if directory is writable overwritten method from base class private

Returns
bool

Reimplemented in ilFileDataImportGroup, ilFileDataImportForum, and ilFileDataImportMail.

Definition at line 68 of file class.ilFileDataImport.php.

Referenced by __checkPath().

{
if(is_writable($this->import_path) && is_readable($this->import_path))
{
return true;
}
else
{
$this->ilias->raiseError("Import directory is not readable/writable by webserver",$this->ilias->error_obj->FATAL);
}
}

+ Here is the caller graph for this function:

ilFileDataImport::_initDirectory ( )
static

init directory overwritten method public

Returns
string path

Reimplemented in ilFileDataImportGroup, ilFileDataImportForum, and ilFileDataImportMail.

Definition at line 86 of file class.ilFileDataImport.php.

References ilUtil\makeDir().

Referenced by ilFileDataImport().

{
if(!@file_exists($this->import_path))
{
ilUtil::makeDir($this->import_path);
}
return true;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilFileDataImport::getPath ( )

get exercise path public

Returns
string path

Reimplemented from ilFileData.

Reimplemented in ilFileDataImportGroup, ilFileDataImportForum, and ilFileDataImportMail.

Definition at line 46 of file class.ilFileDataImport.php.

References $import_path.

Referenced by __checkPath(), and ilFileDataImport().

{
}

+ Here is the caller graph for this function:

ilFileDataImport::ilFileDataImport ( )

Constructor call base constructors checks if directory is writable and sets the optional obj_id.

Parameters
integeregerobj_id public

Definition at line 30 of file class.ilFileDataImport.php.

References _initDirectory(), getPath(), and ilFileData\ilFileData().

Referenced by ilFileDataImportForum\ilFileDataImportForum(), ilFileDataImportGroup\ilFileDataImportGroup(), and ilFileDataImportMail\ilFileDataImportMail().

{
define('IMPORT_PATH','import');
$this->import_path = parent::getPath()."/".IMPORT_PATH;
// IF DIRECTORY ISN'T CREATED CREATE IT
// STATIC CALL TO AVOID OVERWRITE PROBLEMS
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Field Documentation

ilFileDataImport::$import_path

Definition at line 21 of file class.ilFileDataImport.php.

Referenced by getPath().


The documentation for this class was generated from the following file: