php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #42741 ftruncate extended version
Submitted: 2007-09-23 15:21 UTC Modified: 2011-04-08 21:14 UTC
Votes:1
Avg. Score:3.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:0 (0.0%)
From: beotiger at mail dot ru Assigned:
Status: Open Package: Filesystem function related
PHP Version: 5.2.4 OS: *
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2007-09-23 15:21 UTC] beotiger at mail dot ru
Description:
------------
There should be an extending version of ftruncate which allows you to truncate not the end of file but the beginning of it (to a certain size) - so if you request filesize more than the current size, the zeros would be added at the beginning of file, not to the end (on demand, of course).



Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-09-23 15:26 UTC] beotiger at mail dot ru
There should be an extending version of ftruncate which allows you to
truncate not the end of file but the beginning of it (to a certain size)
- so if you request filesize more than the current size, the zeros would
be added at the beginning of file, not to the end (on demand, of
course).
It'd be useful for any logs, if their size shouldn't be more than the given number.
 [2011-04-08 21:14 UTC] jani@php.net
-Package: Feature/Change Request +Package: Filesystem function related -Operating System: any +Operating System: *
 
PHP Copyright © 2001-2017 The PHP Group
All rights reserved.
Last updated: Sun Nov 19 01:31:42 2017 UTC