Skip to content

Commit f27dbd6

Browse files
committed
feat: remotefs 0.3
1 parent 00ca79a commit f27dbd6

File tree

5 files changed

+49
-38
lines changed

5 files changed

+49
-38
lines changed

CHANGELOG.md

+7
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# Changelog
22

33
- [Changelog](#changelog)
4+
- [0.2.0](#020)
45
- [0.1.4](#014)
56
- [0.1.3](#013)
67
- [0.1.2](#012)
@@ -9,6 +10,12 @@
910

1011
---
1112

13+
## 0.2.0
14+
15+
Released on 30/09/2024
16+
17+
- remotefs `0.3.0`
18+
1219
## 0.1.4
1320

1421
Released on 24/05/2024

Cargo.toml

+5-6
Original file line numberDiff line numberDiff line change
@@ -4,27 +4,26 @@ categories = ["network-programming"]
44
description = "remotefs FTP client library"
55
documentation = "https://docs.rs/remotefs-ftp"
66
edition = "2021"
7-
homepage = "https://veeso.github.io/remotefs-rs-ftp/"
87
include = ["src/**/*", "LICENSE", "README.md", "CHANGELOG.md"]
98
keywords = ["remotefs", "ftp-client"]
109
license = "MIT"
1110
name = "remotefs-ftp"
1211
readme = "README.md"
13-
repository = "https://github.com/veeso/remotefs-rs-ftp"
14-
version = "0.1.4"
12+
repository = "https://github.com/remotefs-rs/remotefs-rs-ftp"
13+
version = "0.2.0"
1514

1615
[dependencies]
1716
log = "^0.4"
18-
remotefs = "^0.2.0"
19-
suppaftp = "^6.0"
17+
remotefs = "^0.3"
18+
suppaftp = "^6"
2019
webpki-roots = { version = "^0.22", optional = true }
2120

2221
[dev-dependencies]
2322
env_logger = "^0.11"
2423
pretty_assertions = "^1.0.0"
2524
rand = "^0.8.4"
2625
serial_test = "^3"
27-
tempfile = "^3.2.0"
26+
tempfile = "^3"
2827

2928
[features]
3029
default = ["find"]

README.md

+14-13
Original file line numberDiff line numberDiff line change
@@ -11,17 +11,17 @@
1111
<p align="center">~ Remotefs FTP client ~</p>
1212

1313
<p align="center">Developed by <a href="https://veeso.github.io/" target="_blank">@veeso</a></p>
14-
<p align="center">Current version: 0.1.3 (25/02/2023)</p>
14+
<p align="center">Current version: 0.2.0 (30/09/2024)</p>
1515

1616
<p align="center">
1717
<a href="https://opensource.org/licenses/MIT"
1818
><img
1919
src="https://img.shields.io/badge/License-MIT-teal.svg"
2020
alt="License-MIT"
2121
/></a>
22-
<a href="https://github.com/veeso/remotefs-rs-ftp/stargazers"
22+
<a href="https://github.com/remotefs-rs/remotefs-rs-ftp/stargazers"
2323
><img
24-
src="https://img.shields.io/github/stars/veeso/remotefs-rs-ftp.svg"
24+
src="https://img.shields.io/github/stars/remotefs-rs/remotefs-rs-ftp.svg"
2525
alt="Repo stars"
2626
/></a>
2727
<a href="https://crates.io/crates/remotefs-ftp"
@@ -41,24 +41,24 @@
4141
/></a>
4242
</p>
4343
<p align="center">
44-
<a href="https://github.com/veeso/remotefs-rs-ftp/actions"
44+
<a href="https://github.com/remotefs-rs/remotefs-rs-ftp/actions"
4545
><img
46-
src="https://github.com/veeso/remotefs-rs-ftp/workflows/Linux/badge.svg"
46+
src="https://github.com/remotefs-rs/remotefs-rs-ftp/workflows/Linux/badge.svg"
4747
alt="Linux CI"
4848
/></a>
49-
<a href="https://github.com/veeso/remotefs-rs-ftp/actions"
49+
<a href="https://github.com/remotefs-rs/remotefs-rs-ftp/actions"
5050
><img
51-
src="https://github.com/veeso/remotefs-rs-ftp/workflows/MacOS/badge.svg"
51+
src="https://github.com/remotefs-rs/remotefs-rs-ftp/workflows/MacOS/badge.svg"
5252
alt="MacOS CI"
5353
/></a>
54-
<a href="https://github.com/veeso/remotefs-rs-ftp/actions"
54+
<a href="https://github.com/remotefs-rs/remotefs-rs-ftp/actions"
5555
><img
56-
src="https://github.com/veeso/remotefs-rs-ftp/workflows/Windows/badge.svg"
56+
src="https://github.com/remotefs-rs/remotefs-rs-ftp/workflows/Windows/badge.svg"
5757
alt="Windows CI"
5858
/></a>
59-
<a href="https://coveralls.io/github/veeso/remotefs-rs-ftp"
59+
<a href="https://coveralls.io/github/remotefs-rs/remotefs-rs-ftp"
6060
><img
61-
src="https://coveralls.io/repos/github/veeso/remotefs-rs-ftp/badge.svg"
61+
src="https://coveralls.io/repos/github/remotefs-rs/remotefs-rs-ftp/badge.svg"
6262
alt="Coveralls"
6363
/></a>
6464
<a href="https://docs.rs/remotefs-ftp"
@@ -72,7 +72,7 @@
7272

7373
## About remotefs-ftp ☁️
7474

75-
remotefs-ftp is a client implementation for [remotefs](https://github.com/veeso/remotefs-rs), providing support for the FTP/FTPS protocols.
75+
remotefs-ftp is a client implementation for [remotefs](https://github.com/remotefs-rs/remotefs-rs), providing support for the FTP/FTPS protocols.
7676

7777
---
7878

@@ -81,7 +81,8 @@ remotefs-ftp is a client implementation for [remotefs](https://github.com/veeso/
8181
First of all, add `remotefs-ftp` to your project dependencies:
8282

8383
```toml
84-
remotefs-ftp = "^0.1.3"
84+
remotefs = "0.3"
85+
remotefs-ftp = "^0.2"
8586
```
8687

8788
these features are supported:

src/client.rs

+15-17
Original file line numberDiff line numberDiff line change
@@ -390,7 +390,7 @@ impl RemoteFs for FtpFs {
390390
self.check_connection()?;
391391
let path = Self::resolve(path);
392392
let stream = self.stream.as_mut().unwrap();
393-
stream.rm(&path.as_path().to_string_lossy()).map_err(|e| {
393+
stream.rm(path.as_path().to_string_lossy()).map_err(|e| {
394394
error!("Failed to remove file {}", e);
395395
RemoteError::new_ex(RemoteErrorType::ProtocolError, e)
396396
})
@@ -401,20 +401,18 @@ impl RemoteFs for FtpFs {
401401
self.check_connection()?;
402402
let path = Self::resolve(path);
403403
let stream = self.stream.as_mut().unwrap();
404-
stream
405-
.rmdir(&path.as_path().to_string_lossy())
406-
.map_err(|e| {
407-
error!("Failed to remove directory {}", e);
408-
RemoteError::new_ex(RemoteErrorType::ProtocolError, e)
409-
})
404+
stream.rmdir(path.as_path().to_string_lossy()).map_err(|e| {
405+
error!("Failed to remove directory {}", e);
406+
RemoteError::new_ex(RemoteErrorType::ProtocolError, e)
407+
})
410408
}
411409

412410
fn create_dir(&mut self, path: &Path, _mode: UnixPex) -> RemoteResult<()> {
413411
debug!("Trying to create directory {}", path.display());
414412
self.check_connection()?;
415413
let path = Self::resolve(path);
416414
let stream = self.stream.as_mut().unwrap();
417-
match stream.mkdir(&path.as_path().to_string_lossy()) {
415+
match stream.mkdir(path.as_path().to_string_lossy()) {
418416
Ok(_) => Ok(()),
419417
Err(FtpError::UnexpectedResponse(Response {
420418
status: Status::FileUnavailable,
@@ -465,11 +463,11 @@ impl RemoteFs for FtpFs {
465463
let path = Self::resolve(path);
466464
let stream = self.stream.as_mut().unwrap();
467465
stream
468-
.append_with_stream(&path.as_path().to_string_lossy())
469-
.map(|x| Box::new(x) as Box<dyn Write>)
466+
.append_with_stream(path.as_path().to_string_lossy())
467+
.map(|x| Box::new(x) as Box<dyn Write + Send>)
470468
.map(WriteStream::from)
471469
.map_err(|e| {
472-
format!("Failed to open file: {}", e);
470+
error!("Failed to open file: {}", e);
473471
RemoteError::new_ex(RemoteErrorType::ProtocolError, e)
474472
})
475473
}
@@ -480,11 +478,11 @@ impl RemoteFs for FtpFs {
480478
let path = Self::resolve(path);
481479
let stream = self.stream.as_mut().unwrap();
482480
stream
483-
.put_with_stream(&path.as_path().to_string_lossy())
484-
.map(|x| Box::new(x) as Box<dyn Write>)
481+
.put_with_stream(path.as_path().to_string_lossy())
482+
.map(|x| Box::new(x) as Box<dyn Write + Send>)
485483
.map(WriteStream::from)
486484
.map_err(|e| {
487-
format!("Failed to open file: {}", e);
485+
error!("Failed to open file: {}", e);
488486
RemoteError::new_ex(RemoteErrorType::ProtocolError, e)
489487
})
490488
}
@@ -495,11 +493,11 @@ impl RemoteFs for FtpFs {
495493
let path = Self::resolve(path);
496494
let stream = self.stream.as_mut().unwrap();
497495
stream
498-
.retr_as_stream(&path.as_path().to_string_lossy())
499-
.map(|x| Box::new(x) as Box<dyn Read>)
496+
.retr_as_stream(path.as_path().to_string_lossy())
497+
.map(|x| Box::new(x) as Box<dyn Read + Send>)
500498
.map(ReadStream::from)
501499
.map_err(|e| {
502-
format!("Failed to open file: {}", e);
500+
error!("Failed to open file: {}", e);
503501
RemoteError::new_ex(RemoteErrorType::ProtocolError, e)
504502
})
505503
}

src/lib.rs

+8-2
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
//! First of all you need to add **remotefs** and the client to your project dependencies:
1111
//!
1212
//! ```toml
13-
//! remotefs = "^0.2.0"
14-
//! remotefs-ftp = "^0.1.3"
13+
//! remotefs = "^0.3"
14+
//! remotefs-ftp = "^0.2"
1515
//! ```
1616
//!
1717
//! these features are supported:
@@ -43,6 +43,12 @@
4343
//!
4444
4545
#![doc(html_playground_url = "https://play.rust-lang.org")]
46+
#![doc(
47+
html_favicon_url = "https://raw.githubusercontent.com/remotefs-rs/remotefs-rs/main/assets/logo-128.png"
48+
)]
49+
#![doc(
50+
html_logo_url = "https://raw.githubusercontent.com/remotefs-rs/remotefs-rs/main/assets/logo.png"
51+
)]
4652

4753
// -- crates
4854
#[macro_use]

0 commit comments

Comments
 (0)