From 71b581947a3f0182fb2bd87d7da30375aa9f4320 Mon Sep 17 00:00:00 2001 From: Raffael Sahli Date: Thu, 16 Aug 2018 13:32:32 +0200 Subject: [PATCH] updated readme --- README.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/README.md b/README.md index fd47f1a..088d53e 100644 --- a/README.md +++ b/README.md @@ -102,6 +102,15 @@ fwrite($fh, 'bar'); fclose($fh); ``` +**Note**: write() will truncate your file to 0bytes. You may open a writeable stream with append() which will point +the cursor to the end of the file or create it if it does not exists yet. (append() is only compatible with libsmbclient-php) +```php +$fh = $share->append('test.txt'); +fwrite($fh, 'bar'); +fclose($fh); +``` + + ### Using notify ```php