1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
//! # remotefs-smb
//!
//! remotefs-smb is a client implementation for [remotefs](https://github.com/veeso/remotefs-rs), providing support for the SMB protocol.
//!
//! ## Get started
//!
//! First of all you need to add **remotefs** and the client to your project dependencies:
//!
//! ```toml
//! remotefs = "^0.2.0"
//! remotefs-smb = "^0.2.0"
//! ```
//!
//! these features are supported:
//!
//! - `find`: enable `find()` method for RemoteFs. (*enabled by default*)
//! - `no-log`: disable logging. By default, this library will log via the `log` crate.
//!
//!
//! ### Smb client (UNIX)
//!
//! Here is a basic usage example, with the `Smb` client.
//!
//! ```rust
//!
//! // import remotefs trait and client
//! use remotefs::{RemoteFs, fs::UnixPex};
//! use remotefs_smb::{SmbFs, SmbOptions, SmbCredentials};
//! use std::path::Path;
//!
//! let mut client = SmbFs::try_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();
//!
//! // connect
//! assert!(client.connect().is_ok());
//! // get working directory
//! println!("Wrkdir: {}", client.pwd().ok().unwrap().display());
//! // make directory
//! assert!(client.create_dir(Path::new("/cargo"), UnixPex::from(0o755)).is_ok());
//! // change working directory
//! assert!(client.change_dir(Path::new("/cargo")).is_ok());
//! // disconnect
//! assert!(client.disconnect().is_ok());
//! ```
//!
pub use ;
pub use ;
// -- utils
pub