Crate filego

Source
Expand description

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

Modules§

check
Check module.
merge
Merge module.
split
Split module.

Constants§

BUFFER_CAPACITY_MAX_DEFAULT
The default maximum size of the buffer capacity in bytes.
CHUNK_SIZE_DEFAULT
The default chunk size in bytes.