本文整理汇总了PHP中Piwik\Filesystem::remove方法的典型用法代码示例。如果您正苦于以下问题:PHP Filesystem::remove方法的具体用法?PHP Filesystem::remove怎么用?PHP Filesystem::remove使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Piwik\Filesystem
的用法示例。
在下文中一共展示了Filesystem::remove方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: delete
public function delete()
{
if ($this->exists()) {
try {
Filesystem::remove($this->getAbsoluteLocation());
} catch (Exception $e) {
throw new Exception("Unable to delete merged file : " . $this->getAbsoluteLocation() . ". Please delete the file and refresh");
}
// try to remove compressed version of the merged file.
Filesystem::remove($this->getAbsoluteLocation() . ".deflate", true);
Filesystem::remove($this->getAbsoluteLocation() . ".gz", true);
}
}
示例2: test_removeNonExistingFile_shouldNotThrowException
public function test_removeNonExistingFile_shouldNotThrowException()
{
Filesystem::remove('foo');
}