Re: file_put_contents() / file_add_contents() ?
| From: | Markus Fischer | Date: | Fri, 21 Feb 2003 14:55:02 +0000 |
| Subject: | Re: file_put_contents() / file_add_contents() ? | ||
| References: | 1 2 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-94433@lists.php.net to get a copy of this message | ||
On Fri, Feb 21, 2003 at 03:04:27AM +0200, Jani Taskinen wrote :
> On Thu, 20 Feb 2003, Sara Golemon wrote:
>
> >I recall a discussion sometime back about making file_put_contents() (create
> >a file and write the provided contents to it in one command) and
> >file_add_contents() (like put but append rather than overwrite) to
> >complement file_get_contents() but looking in HEAD I don't see either put or
> >add.
>
> It sure would be nice to have..but why not just one function:
>
> bool file_write_content(string filename, string data [, bool append [, bool
> use_include_path]]);
Insteaf of creating multiple optional parameters wouldn't it
be a good idea to use one boolean parameter which acts as a
flag ?