PowerShell, Learn it or Perish ;-)

master nix

Xamarin Android C# bindings for Java CIFS (jCIFS) Client Library (Samba)

I posted a Samba/JCIFS binding library to my Github account…


This is a C# binding library for the The Java CIFS (jCIFS) Client Library (version 1.3.18).

JCIFS is an Open Source client library that implements the CIFS/SMB networking protocol in 100% Java.

You can read/write, delete, make directories, rename, list contents of a directory, list the workgroups/ntdomains and servers on the network, list the shares of a server, open named pipes, authenticate web clients …etc.


As JCIFS is Licensed Under the LGPL, so is this project’s license.

API Documentation:

Consult the jCIFS site for API documention and usage, this is a C# binding library and does not implement/change anything within the jcifs-1.3.18.jar.


Usage of Jcifs.Smb.SmbFileInputStream:

// This is NOT best-practice code, just showing a demo Jcifs api call
public async Task getFileContents ()
    await Task.Run (() => {
        var smbStream = new SmbFileInputStream ("smb://guest@");
        byte[] b = new byte[8192];
        int n;
        while ((n = smbStream.Read (b)) > 0) {
            Console.Write (Encoding.UTF8.GetString (b).ToCharArray (), 0, n);
        Button button = FindViewById<Button> (Resource.Id.myButton);
        RunOnUiThread(() => {
            button.Text = Encoding.UTF8.GetString (b);
    ).ContinueWith ((Task arg) => {
        Console.WriteLine (arg.Status);
        if (arg.Status == TaskStatus.Faulted)
            Console.WriteLine (arg.Exception);


The entire jCIFS library is not bound by this project, consult the “Metadata.xml” file in the binding project for method renames and class exclusions.