Skip to content
/ EzSmb Public

SMB(Windows shared folder) Clinet Library powered by TalAloni's SmbLibrary, Xamarin & .NET Core Ready.

License

Notifications You must be signed in to change notification settings

ume05rw/EzSmb

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

62 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

EzSmb

SMB(Windows shared folder) Client Library powered by TalAloni's SmbLibrary, Xamarin & .NET Core Ready.

NuGet

Description

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.

Requirement

SMBLibrary.ForXamarin >= 1.4.6.1
NETStandard.Library >= 2.0.3

Usage

Add NuGet Package to your project.

PM> Install-Package EzSmb

and write code like this:

Get items in shared folder:

//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}");
}

Read file:

//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:

Class Tree: Namespace.md

Breaking changes:

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

Licence

LGPL v3 Licence

Author

Do-Be's

Contributors

upcu
synmra
icnocop
DenisKrasakovSDV

#What did I do wrong operation? synmra was not added to sidebar...

Links

GitHub - TalAloni/SMBLibrary: SMB client & server implements.
https://github.com/TalAloni/SMBLibrary

About

SMB(Windows shared folder) Clinet Library powered by TalAloni's SmbLibrary, Xamarin & .NET Core Ready.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages