Giter Site home page Giter Site logo

zhaojingbo918 / ezsmb Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ume05rw/ezsmb

0.0 1.0 0.0 190 KB

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

License: GNU Lesser General Public License v3.0

C# 100.00%

ezsmb's Introduction

EzSmb

SMB(Windows shared folder) Clinet 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 >= 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:

The first argument of Node.GetList method has been changed since version 1.3.

Node.GetList(string filter = "*", string relatedPath = null)
//           ^^ Inserted          ^^ move to second arg

Licence

LGPL v3 Licence

Author

Do-Be's

Contributors

upcu
synmra

#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

ezsmb's People

Contributors

ume05rw avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.