Subversion Repositories Applications.projet

Rev

Rev 24 | Rev 249 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 24 Rev 202
Line 17... Line 17...
17
// |                                                                                                      |
17
// |                                                                                                      |
18
// | You should have received a copy of the GNU General Public                                            |
18
// | You should have received a copy of the GNU General Public                                            |
19
// | License along with this library; if not, write to the Free Software                                  |
19
// | License along with this library; if not, write to the Free Software                                  |
20
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA                            |
20
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA                            |
21
// +------------------------------------------------------------------------------------------------------+
21
// +------------------------------------------------------------------------------------------------------+
22
// CVS : $Id: fichier.class.php,v 1.5 2005-10-04 10:13:33 alexandre_tb Exp $
22
// CVS : $Id: fichier.class.php,v 1.6 2007-04-19 09:25:50 alexandre_tb Exp $
23
/**
23
/**
24
* Application projet
24
* Application projet
25
*
25
*
26
* La classe fichier
26
* La classe fichier
27
*
27
*
Line 29... Line 29...
29
//Auteur original :
29
//Auteur original :
30
*@author        Alexandre Granier <alexandre@tela-botanica.org>
30
*@author        Alexandre Granier <alexandre@tela-botanica.org>
31
//Autres auteurs :
31
//Autres auteurs :
32
*@author        Aucun
32
*@author        Aucun
33
*@copyright     Tela-Botanica 2000-2004
33
*@copyright     Tela-Botanica 2000-2004
34
*@version       $Revision: 1.5 $
34
*@version       $Revision: 1.6 $
35
// +------------------------------------------------------------------------------------------------------+
35
// +------------------------------------------------------------------------------------------------------+
36
*/
36
*/
Line 37... Line 37...
37
 
37
 
Line 187... Line 187...
187
     *
187
     *
188
     * @return bool
188
     * @return bool
189
     * @access public
189
     * @access public
190
     */
190
     */
191
    function isRepertoire( )
191
    function isRepertoire( )
192
    {
-
 
193
        return is_dir ($this->_chemin) ;
192
    {	$isRep = is_dir ($this->_chemin) ;
-
 
193
        return $isRep ;
194
    } // end of member function isRepertoire
194
    } // end of member function isRepertoire
Line 195... Line 195...
195
 
195
 
196
 
196
 
Line 216... Line 216...
216
    function getTaille( )
216
    function getTaille( )
217
    {
217
    {
218
        if ($this->isRepertoire()) {
218
        if ($this->isRepertoire()) {
219
            return $this->_tailleRepertoire($this->_chemin) ;
219
            return $this->_tailleRepertoire($this->_chemin) ;
220
        }
220
        }
221
        return filesize ($this->_chemin) ;
221
        return @filesize ($this->_chemin) ;
222
    } // end of member function getTaille
222
    } // end of member function getTaille
Line 223... Line 223...
223
 
223
 
224
    /**
224
    /**
225
     * Renovie le nom du fichier, sur le disque.
225
     * Renovie le nom du fichier, sur le disque.
Line 256... Line 256...
256
        foreach ($liste_fichier as $key => $value) {
256
        foreach ($liste_fichier as $key => $value) {
257
            if (is_dir ($rep."/".$value) && $value != ".." && $value != ".") {
257
            if (is_dir ($rep."/".$value) && $value != ".." && $value != ".") {
Line 258... Line 258...
258
            
258
            
259
                $taille += $this->_tailleRepertoire ($rep.$value."/") ;
259
                $taille += $this->_tailleRepertoire ($rep.$value."/") ;
260
            } else {
260
            } else {
261
                if ($value != '..' && $value != '.') $taille += filesize ($rep.$value) ;
261
                if ($value != '..' && $value != '.') $taille += @filesize ($rep.$value) ;
262
            }
262
            }
263
        }
263
        }
264
        return $taille ;
264
        return $taille ;