SMB(Windows shared folder) Client Library powered by TalAloni's SmbLibrary, Xamarin & .NET Core Ready.
It's easy to use, and supports SMB ver2 for Windows 10.
Xamarin & .NET Core can access Windows Shared Folders and NAS without using mpr.dll or Netapi32.dll.
Supports .Net Standard 2.0.
SMBLibrary.ForXamarin >= 1.4.6.1
NETStandard.Library >= 2.0.3
Add NuGet Package to your project.
PM> Install-Package EzSmb
and write code like this:
//using EzSmb;
//using System;
// Get folder Node.
var folder = await Node.GetNode(@"192.168.0.1\ShareName\FolderName", "userName", "password");
// List items
var nodes = await folder.GetList();
foreach (var node in nodes)
{
Console.WriteLine($"Name: {node.Name}, Type: {node.Type}, LastAccessed: {node.LastAccessed:yyyy-MM-dd HH:mm:ss}");
}
//using EzSmb;
//using System;
//using System.Text;
// Get file Node.
var file = await Node.GetNode(@"192.168.0.1\ShareName\FolderName\FileName.txt", "userName", "password");
// Get MemoryStream.
using (var stream = await file.Read())
{
var text = Encoding.UTF8.GetString(stream.ToArray());
Console.WriteLine(text);
}
and more:
- Create new folder/file
- Move folder/file
- Delete folder/file
- Scan servers & shares on LAN
- Authentication
- Random access by Stream
- Get errors
Class Tree: Namespace.md
ver1.3.0: The first argument of Node.GetList method has been changed.
Node.GetList(string filter = "*", string relatedPath = null)
// ^^ Inserted ^^ move to second arg
upcu
synmra
icnocop
DenisKrasakovSDV
#What did I do wrong operation? synmra was not added to sidebar...
GitHub - TalAloni/SMBLibrary: SMB client & server implements.
https://github.com/TalAloni/SMBLibrary