mirror of
https://codeberg.org/icewind/SMB.git
synced 2026-06-03 17:24:07 +02:00
Implement the File stream interface
This commit is contained in:
parent
40b6fb8d12
commit
dbc6aa4a9e
3 changed files with 23 additions and 3 deletions
|
|
@ -7,7 +7,9 @@
|
|||
|
||||
namespace Icewind\SMB;
|
||||
|
||||
class NativeStream {
|
||||
use Icewind\Streams\File;
|
||||
|
||||
class NativeStream implements File {
|
||||
/**
|
||||
* @var resource
|
||||
*/
|
||||
|
|
@ -55,7 +57,7 @@ class NativeStream {
|
|||
}
|
||||
|
||||
|
||||
public function stream_open() {
|
||||
public function stream_open($path, $mode, $options, &$opened_path) {
|
||||
$context = stream_context_get_options($this->context);
|
||||
$this->state = $context['nativesmb']['state'];
|
||||
$this->handle = $context['nativesmb']['handle'];
|
||||
|
|
@ -85,4 +87,12 @@ class NativeStream {
|
|||
public function stream_truncate($size) {
|
||||
return $this->state->ftruncate($this->handle, $size);
|
||||
}
|
||||
|
||||
public function stream_set_option($option, $arg1, $arg2) {
|
||||
return false;
|
||||
}
|
||||
|
||||
public function stream_lock($operation) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue