ILIAS
eassessment Revision 61809
◀ ilDoc Overview
Main Page
Related Pages
Modules
Namespaces
Data Structures
Files
Examples
File List
Globals
All
Data Structures
Namespaces
Files
Functions
Variables
Groups
Pages
class.ilFileDataImport.php
Go to the documentation of this file.
1
<?php
2
/* Copyright (c) 1998-2009 ILIAS open source, Extended GPL, see docs/LICENSE */
3
4
12
require_once(
"classes/class.ilFileData.php"
);
13
14
class
ilFileDataImport
extends
ilFileData
15
{
21
var
$import_path
;
22
30
function
ilFileDataImport
()
31
{
32
define(
'IMPORT_PATH'
,
'import'
);
33
parent::ilFileData
();
34
$this->import_path =
parent::getPath
().
"/"
.IMPORT_PATH;
35
36
// IF DIRECTORY ISN'T CREATED CREATE IT
37
// STATIC CALL TO AVOID OVERWRITE PROBLEMS
38
ilFileDataImport::_initDirectory
();
39
}
40
46
function
getPath
()
47
{
48
return
$this->import_path
;
49
}
50
51
// PRIVATE METHODS
52
function
__checkPath
()
53
{
54
if
(!@file_exists($this->
getPath
()))
55
{
56
return
false
;
57
}
58
$this->
__checkReadWrite
();
59
60
return
true
;
61
}
68
function
__checkReadWrite
()
69
{
70
if
(is_writable($this->import_path) && is_readable($this->import_path))
71
{
72
return
true
;
73
}
74
else
75
{
76
$this->ilias->raiseError(
"Import directory is not readable/writable by webserver"
,$this->ilias->error_obj->FATAL);
77
}
78
}
86
function
_initDirectory
()
87
{
88
if
(!@file_exists($this->import_path))
89
{
90
ilUtil::makeDir
($this->import_path);
91
}
92
return
true
;
93
}
94
}
classes
class.ilFileDataImport.php
Generated on Mon Apr 25 2016 19:01:05 for ILIAS by
1.8.1.2 (using
Doxyfile
)