Req #12321 [Opn->Wfx]: ftruncate poorly named, suggest alias
| From: | jani@php.net | Date: | Fri, 31 Dec 2010 21:48:23 +0000 |
| Subject: | Req #12321 [Opn->Wfx]: ftruncate poorly named, suggest alias | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-157425@lists.php.net to get a copy of this message | ||
Edit report at http://bugs.php.net/bug.php?id=12321&edit=1
ID: 12321
Updated by: jani@php.net
Reported by: dshadow at zort dot net
Summary: ftruncate poorly named, suggest alias
-Status: Open
+Status: Wont fix
Type: Feature/Change Request
-Package: Feature/Change Request
+Package: *General Issues
Operating System: Linux
PHP Version: 4.0.6
Block user comment: N
Private report: N
New Comment:
It's fine as it is.
Previous Comments:
------------------------------------------------------------------------
[2001-07-23 13:56:05] dshadow at zort dot net
Yes, it is, but that doesn't mean that it's a good name. I'm not
suggesting renaming ftruncate. All I want is an alias like fresize so
that when looking at the function list, it's easier to find this
function, and the documentation updated so that it's clear that
ftruncate can make a file larger. Try doing a search for "resize file"
or "change file size" on the website. You won't find anything useful.
------------------------------------------------------------------------
[2001-07-23 13:51:00] hholzgra@php.net
it's just the name of the C function/system call
doing the same job
------------------------------------------------------------------------
[2001-07-23 13:22:48] dshadow at zort dot net
The ftruncate function is poorly named, as it can be used to enlarge a
file, not just truncate it. I suggest creating an alias to this
function, "fresize", to make it clear that a file can be arbitrarially
resized. I also suggest that the manual be updated to indicate that
ftruncate can enlarge a file as well: "Changes a file's size", rather
than, "truncates a file to a given length.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/bug.php?id=12321&edit=1