filego

Crates.iofilego
lib.rsfilego
version0.5.4
created_at2024-05-22 09:06:59.273015+00
updated_at2025-05-28 11:16:35.092402+00
descriptionA file splitting & merging solution
homepagehttps://github.com/alpheusday/filego.rs
repositoryhttps://github.com/alpheusday/filego.rs
max_upload_size
id1247722
size69,075
Alpheus (alpheusmtx)

documentation

README

FileGo

A file splitting & merging solution.

Quick Start

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();

License

This project is licensed under the terms of the MIT license.

Commit count: 83

cargo fmt