25 private $_sAdresse=null;
60 $this->_sAdresse=$sAdresse;
69 return $this->_sAdresse;
79 return basename($this->_sAdresse);
90 public function getList($tInclusion=null,$tExclusion=null,$bWithHidden=
false){
93 $open=openDir($this->_sAdresse);
97 while(
false !== ($sFile=readDir($open)) ){
99 $bIsDir=is_dir($this->_sAdresse.
'/'.$sFile);
100 $tDetailFile=preg_split(
'/\./',$sFile);
102 if($bWithHidden==
false and $sFile[0]==
'.'){
104 }elseif($bIsDir==
true){
105 $oElement=
new _dir($this->_sAdresse.
'/'.$sFile);
108 ($tInclusion==null or in_array(end($tDetailFile),$tInclusion))
110 ($tExclusion==null or !in_array(end($tDetailFile),$tExclusion))
112 $oElement=
new _file($this->_sAdresse.
'/'.$sFile);
129 public function getListFile($tInclusion=null,$tExclusion=null,$bWithHidden=
false){
132 $open=openDir($this->_sAdresse);
136 while(
false !== ($sFile=readDir($open)) ){
138 $bIsDir=is_dir($this->_sAdresse.
'/'.$sFile);
139 $tDetailFile=preg_split(
'/\./',$sFile);
141 if($bWithHidden==
false and $sFile[0]==
'.'){
146 and ($tInclusion==null or in_array(end($tDetailFile),$tInclusion))
147 and ($tExclusion==null or !in_array(end($tDetailFile),$tExclusion))
150 $oElement=
new _file($this->_sAdresse.
'/'.$sFile);
170 $open=openDir($this->_sAdresse);
174 while(
false !== ($sFile=readDir($open)) ){
176 $bIsDir=is_dir($this->_sAdresse.
'/'.$sFile);
178 if($bWithHidden==
false and $sFile[0]==
'.'){
180 }elseif($bIsDir==
true){
181 $oElement=
new _dir($this->_sAdresse.
'/'.$sFile);
194 public function delete(){
197 if(!@rmdir($this->_sAdresse)){
198 throw new Exception(
'Erreur rmdir ('.$this->_sAdresse.
')');
207 return file_exists($this->_sAdresse);
214 mkdir($this->_sAdresse);
220 public function chmod($valeur=0777){
221 chmod($this->_sAdresse,$valeur);
224 private function verif(){
226 if($this->_sAdresse==null){
227 throw new Exception(
'objet _dir: Adresse du repertoire non defini');
231 throw new Exception($this->_sAdresse.
' n\'existe pas');
__construct($sAdresse=null)
getListFile($tInclusion=null, $tExclusion=null, $bWithHidden=false)
getList($tInclusion=null, $tExclusion=null, $bWithHidden=false)
getListDir($bWithHidden=false)