This commit is contained in:
raffis 2019-10-09 11:20:47 +02:00
commit 04315265fd
No known key found for this signature in database
GPG key ID: 5E0BF46A67AD81C4

View file

@ -102,8 +102,10 @@ 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)
**Note**: write() will truncate your file to 0bytes and sets the cursor to the beginning. You may set the optional flag `truncate` to `false` to overcome this.
You may also use append() which will set
the cursor to the end of the file or create it if it does not exist yet. (append() is only compatible with libsmbclient-php)
```php
$fh = $share->append('test.txt');
fwrite($fh, 'bar');