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
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
MUST BE VALID
Solve the problem:
14 - 12 = ?
Subscribe to this entry?

 
 [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-2019 The PHP Group
All rights reserved.
Last updated: Sun May 26 13:01:25 2019 UTC