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

search for in the

PharData::addFile> <PharData
Last updated: Fri, 10 Oct 2008

view this page in

PharData::addEmptyDir

(No version information available, might be only in CVS)

PharData::addEmptyDir空のディレクトリを tar/zip アーカイブに追加する

説明

bool PharData::addEmptyDir ( string $dirname )

このメソッドを使用すると、空のディレクトリが dirname に作成されます。このメソッドは ZipArchive::addEmptyDir() と同じようなものです。

パラメータ

dirname

phar アーカイブ内に作成する空のディレクトリの名前。

返り値

返り値はありません。失敗時には例外をスローします。

例1 PharData::addEmptyDir() の例

<?php
try {
    
$a = new PharData('/path/to/my.tar');

    
$a->addEmptyDir('/full/path/to/file');
    
// できあがったファイルを確認します
    
$b $a['full/path/to/file']->isDir();
} catch (
Exception $e) {
    
// ここでエラー処理をします
}
?>



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

PharData::addFile> <PharData
Last updated: Fri, 10 Oct 2008
 
 
show source | credits | sitemap | contact | advertising | mirror sites