Crates.io | filego |
lib.rs | filego |
version | 0.5.4 |
created_at | 2024-05-22 09:06:59.273015+00 |
updated_at | 2025-05-28 11:16:35.092402+00 |
description | A file splitting & merging solution |
homepage | https://github.com/alpheusday/filego.rs |
repository | https://github.com/alpheusday/filego.rs |
max_upload_size | |
id | 1247722 |
size | 69,075 |
A file splitting & merging solution.
Split file from a path to a directory with Split
struct.
use std::path::PathBuf;
use filego::split::{Split, SplitResult};
let result: SplitResult = Split::new()
.in_file(PathBuf::from("path").join("to").join("file"))
.out_dir(PathBuf::from("path").join("to").join("dir"))
.run()
.unwrap();
Async version also available with the async_std
and tokio
features:
// This is a `async_std` example
use async_std::path::PathBuf;
use filego::split::{
Split,
SplitResult,
async_std::SplitAsyncExt as _,
};
let result: SplitResult = Split::new()
.in_file(PathBuf::from("path").join("to").join("file"))
.out_dir(PathBuf::from("path").join("to").join("dir"))
.run_async()
.await
.unwrap();
// This is a `tokio` example
use std::path::PathBuf;
use filego::split::{
Split,
SplitResult,
tokio::SplitAsyncExt as _,
};
let result: SplitResult = Split::new()
.in_file(PathBuf::from("path").join("to").join("file"))
.out_dir(PathBuf::from("path").join("to").join("dir"))
.run_async()
.await
.unwrap();
This project is licensed under the terms of the MIT license.