From 08e9bbdb1aaf239a5152e852ce826d84437f0dae Mon Sep 17 00:00:00 2001 From: Dominique Fournier Date: Tue, 23 Aug 2016 18:44:24 +0000 Subject: [PATCH] file : add flags support for file_put_contents git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@3004 bf3deb0d-5f1a-0410-827f-c0cc1f45334c --- file.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/file.php b/file.php index 55981ef..09214fb 100644 --- a/file.php +++ b/file.php @@ -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;