downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | conferences | my php.net

search for in the

PharData::addFile> <PharData
[edit] Last updated: Fri, 17 May 2013

view this page in

PharData::addEmptyDir

(PHP >= 5.3.0, PECL phar >= 2.0.0)

PharData::addEmptyDirAñadir un directorio vacío al archivo tar/zip

Descripción

bool PharData::addEmptyDir ( string $dirname )

Con este método se crea un directorio vacío con la ruta dada por dirname. Este método es similar a ZipArchive::addEmptyDir().

Parámetros

dirname

El nombre de directorio vacío a crear en el archivo tar o zip

Valores devueltos

No devuelve ningún valor, se lanza una excepción en caso de error.

Ejemplos

Ejemplo #1 Un ejemplo de PharData::addEmptyDir()

<?php
try {
    
$a = new PharData('/ruta/a/phar.phar');

    
$a->addEmptyDir('/ruta/completa/a/fichero');
    
// demuestra cómo se almacena este fichero
    
$b $a['ruta/completa/a/fichero']->isDir();
} catch (
Exception $e) {
    
// manejar los errores aquí
}
?>

Ver también



add a note add a note User Contributed Notes PharData::addEmptyDir - [0 notes]
There are no user contributed notes for this page.

 
show source | credits | sitemap | contact | advertising | mirror sites