pharfileinfo.delmetadata(3) php man page | unix.com

Man Page: pharfileinfo.delmetadata

Operating Environment: php

Section: 3

PHARFILEINFO.DELMETADATA(3)						 1					       PHARFILEINFO.DELMETADATA(3)

PharFileInfo::delMetadata - Deletes the metadata of the entry

SYNOPSIS
public bool PharFileInfo::delMetadata (void )
DESCRIPTION
Deletes the metadata of the entry, if any.
PARAMETERS
No parameters.
RETURN VALUES
Returns TRUE if successful, FALSE if the entry had no metadata. As with all functionality that modifies the contents of a phar, the phar.readonly INI variable must be off in order to succeed if the file is within a Phar archive. Files within PharData archives do not have this restriction.
ERRORS
/EXCEPTIONS Throws PharException if errors occurred while flushing changes to disk, and BadMethodCallException if write access is disabled.
EXAMPLES
Example #1 A PharFileInfo.delMetaData(3) example <?php try { $a = new Phar('myphar.phar'); $a['hi'] = 'hi'; var_dump($a['hi']->delMetadata()); $a['hi']->setMetadata('there'); var_dump($a['hi']->delMetadata()); var_dump($a['hi']->delMetadata()); } catch (Exception $e) { // handle errors } ?> The above example will output: bool(false) bool(true) bool(false)
SEE ALSO
PharFileInfo.setMetadata(3), PharFileInfo.hasMetadata(3), PharFileInfo.getMetadata(3), Phar.setMetadata(3), Phar.hasMetadata(3), Phar.get- Metadata(3). PHP Documentation Group PHARFILEINFO.DELMETADATA(3)
Related Man Pages
pharfileinfo.delmetadata(3) - php
pharfileinfo.setmetadata(3) - php
pharfileinfo.getmetadata(3) - php
phar.interceptfilefuncs(3) - php
pharfileinfo.chmod(3) - php
Similar Topics in the Unix Linux Community
UNIX.COM 2017 Year End Summary
Coming Soon: Upgrade Forum Software (Dec 31 - Jan 1)
Please Welcome Don Cragun as Lead Moderator
Status of UNIX.COM Forum Transformation
Please Welcome Nicki Paul to the Moderator Team!