Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Crate pavao

Source
Expand description

§Pavão

Pavão is a Rust client library for SMB2/SMB3 which exposes type-safe functions to interact with the C libsmbclient

§Get Started

§Adding pavao to your cargo toml dependencies:

pavao = "0.2"

§Example

use pavao::{SmbClient, SmbCredentials, SmbOptions};

let client = SmbClient::new(
    SmbCredentials::default()
        .server("smb://localhost:3445")
        .share("/temp")
        .username("test")
        .password("test")
        .workgroup("pavao"),
    SmbOptions::default()
        .case_sensitive(true)
        .one_share_per_server(true),
    )
    .unwrap();

// drop connection
drop(client);

Further examples can be found under the examples/ directory in the Github repository

Structs§

SmbClient
Smb protocol client
SmbCredentials
SmbCredentials
SmbDirent
Smb directory entity
SmbDirentInfo
SMB directory entity with metadata
SmbFile
SmbMode
Describes the permissions on POSIX system.
SmbModeClass
Describes the permissions on POSIX system for a user class
SmbOpenOptions
Describes options for opening file
SmbOptions
Smb connection options
SmbStat
Smb stat type
SmbStatVfs
Smb statvfs type

Enums§

SmbDirentType
Type of directory entity in the smb protocol
SmbEncryptionLevel
Encryption level option
SmbError
Smb protocol error
SmbShareMode
Share mode option

Type Aliases§

SmbResult
Result returned by the Smb client