Req #74772 [Opn]: splfileobject lock and unavailable FCLOSE, REMOVE file.
Edit report at https://bugs.php.net/bug.php?id=74772&edit=1
ID: 74772
Updated by: cmb@php.net
Reported by: anatoliy dot danchuk dot softimus at gmail dot com
Summary: splfileobject lock and unavailable FCLOSE, REMOVE
file.
Status: Open
Type: Feature/Change Request
Package: SPL related
Operating System: Ubuntu
PHP Version: 7.0.20
Block user comment: N
Private report: N
New Comment:
The file descriptor should be closed as soon as the SplFileObject
is destroyed. There is, apparently, no way to unlink the file.
Previous Comments:
------------------------------------------------------------------------
[2017-06-17 13:05:45] anatoliy dot danchuk dot softimus at gmail dot com
Description:
------------
---
From manual page: http://www.php.net/class.splfileobject
---
How delete/remove/rename file after create object ?
http://ua2.php.net/manual/en/class.splfileobject.php#113149
Test script:
---------------
<?php
$file_object = new SplFileObject(__FILE__);
// $file_object->closeFile();
// $file_object->fclose();
$file_object->close();
// $file_object->unlink();
$file_object->remove();
// $file_object->rename();
// $file_object->move();
Expected result:
----------------
after $file_object = new SplFileObject(__FILE__);
I can close file descriptor, delete file.
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=74772&edit=1
Thread (2 messages)