#file #operations #utilities #file-io #collection #link #symlink

filey

A collection of utilities to make file operations more convenient

18 releases (6 stable)

1.4.0 Feb 15, 2024
1.3.0 Feb 7, 2024
1.0.0 Jan 13, 2024
0.3.9 Dec 2, 2023
0.1.0 Nov 23, 2023

#19 in #symlink

Download history 8/week @ 2024-01-13 20/week @ 2024-01-27 25/week @ 2024-02-03 103/week @ 2024-02-10 87/week @ 2024-02-17 85/week @ 2024-02-24 15/week @ 2024-03-02 32/week @ 2024-03-09 38/week @ 2024-03-16 4/week @ 2024-03-23 82/week @ 2024-03-30 25/week @ 2024-04-06

113 downloads per month
Used in 3 crates

MIT/Apache

31KB
624 lines

filey-rs

A collection of utilities to make file operations more convenient.

Install

Run the following Cargo command in your project directory:

cargo add filey

Or add the following line to your Cargo.toml:

filey = "1.4.0"

Examples

Move a file to git repository and create symbolic link.

use filey::Filey;

let mut vimrc = Filey::new("~/.vimrc").expand_user()?;
let mut f = vimrc.move_to("dotfiles/")?;
f.symlink(&vimrc.path())?;

lib.rs:

filey

'filey' is a collection of utilities to make file operations more convenient.

This library is made up of three main components:

A Basic example

use filey::Filey;
#
use filey::{Filey, FileTypes};

let mut file = Filey::new(".great_app.conf").create(FileTypes::File)?;
let file_size = file.size()?;
println!("{}", file_size); // 0

let dotfile = file.move_to("dotfiles/")?;

dotfile.symlink(".great_app.conf")?;

Dependencies

~3–5MB
~100K SLoC