Phar::addEmptyDir

(Unknown)

Phar::addEmptyDirAdd an empty directory to the phar archive

설명

public void Phar::addEmptyDir ( string $dirname )

Note:

이 메쏘드가 Phar 객체에 작용하려면 php.ini 설정 phar.readonly0으로 설정해야 합니다. 그렇지 않으면, PharException이 발생합니다.

With this method, an empty directory is created with path dirname. This method is similar to ZipArchive::addEmptyDir().

인수

dirname

The name of the empty directory to create in the phar archive

반환값

no return value, exception is thrown on failure.

예제

Example #1 A Phar::addEmptyDir() example

<?php
try {
    
$a = new Phar('/path/to/phar.phar');

    
$a->addEmptyDir('/full/path/to/file');
    
// demonstrates how this file is stored
    
$b $a['full/path/to/file']->isDir();
} catch (
Exception $e) {
    
// handle errors here
}
?>

참고

add a note add a note

User Contributed Notes

There are no user contributed notes for this page.
To Top