diff --git a/README.md b/README.md index 8a7f1e7..db46cdd 100644 --- a/README.md +++ b/README.md @@ -3,16 +3,22 @@ ## Usage ```php use Icewind\SMB\Server; +use Icewind\SMB\NativeServer; use League\Flysystem\Filesystem; use RobGridley\Flysystem\Smb\SmbAdapter; -$server = new Server('host', 'username', 'password'); +if (Server::nativeAvailable()) { + $server = new NativeServer('host', 'username', 'password'); +} else { + $server = new Server('host', 'username', 'password'); +} + $share = $server->getShare('name'); $filesystem = new Filesystem(new SmbAdapter($share)); ``` + ## Installation ``` $ composer require robgridley/flysystem-smb -$ composer update ```