file : add flags support for file_put_contents

git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@3004 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
This commit is contained in:
2016-08-23 18:44:24 +00:00
parent f6ae8eaeae
commit 08e9bbdb1a

View File

@@ -188,7 +188,7 @@ class file
* @throws If parent directory not exists, is not writeable, or the file
* exists and is not writeable
*/
public function file_put_contents ($filename, $data)
public function file_put_contents ($filename, $data, $flags)
{
$this->debug (2, "file_put_contents ($filename)");
$filename = $this->realpath ($filename);
@@ -201,7 +201,7 @@ class file
throw new \Exception (sprintf (dgettext ("domframework",
"File '%s' is not a file"),
$filename), 500);
$contents = file_put_contents ($filename, $data);
$contents = file_put_contents ($filename, $data, $flags);
$this->debug (1, "file_put_contents ($filename, \$data) => ".
"$contents bytes");
return $contents;