12 releases (6 major breaking)
12.0.0 | Jun 25, 2023 |
---|---|
11.0.0 | Jun 14, 2023 |
10.0.0 | Mar 23, 2023 |
9.0.3 | Jan 18, 2023 |
1.0.0 | Nov 15, 2022 |
#757 in Filesystem
Used in rust-web-server
105KB
2K
SLoC
Welcome to file-ext!
Hi, file-ext
is a collection of utility functions to work with files. It is tested and works on Linux, macOS and Windows.
Features
- File
- Read
- Read partially
- Does file exist
- Create
- Read file, if it doesn't exist create and write to file
- Write to file
- Delete
- Copy
- Directory
- Create
- Does directory exist
- Delete directory
- Path
- Absolute path to working directory
- Get OS dependent path separator ('/' on Unix, '\' on Windows)
- Get path to OS temporary folder ('/tmp' on Linux and macOS, 'C:\Users\username\AppData\Local\Temp' on Windows
- Symlink
- Does symlink exist
- Get path symlink points to
- Create symlink
- User
- Get the name of the user who is running the process
- Get domain user belongs to (available only on Windows)
Configuration
No additional configuration.
Demo
Take a look at mod.rs
Documentation
Take a look at mod.rs
Crate
Build
If you want to build file-ext
on your own, make sure you have Rust installed.
$ cargo build
Test
If you want to test file-ext
.
$ cargo test
Community
Use GitHub discussions, issues and pull requests.
There is Rust Web Server Discord where you can ask questions and share ideas.
Follow the Rust code of conduct.
Donations
Send me tips via PayPal.