8000 GitHub - alpheusday/filego.rs: A file splitting & merging solution
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
This repository was archived by the owner on Jun 9, 2025. It is now read-only.

alpheusday/filego.rs

Repository files navigation

FileGo

A file splitting & merging solution.

Installation

To install this package, run the following command:

cargo add filego

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.

About

A file splitting & merging solution

Topics

Resources

License

Stars

Watchers

Forks

Contributors 2

  •  
  •  
0